* update hfsprogs to 540.1.linux3-4

This commit is contained in:
Alexander Baldeck 2022-03-17 08:43:51 +01:00
parent 9170513aaa
commit bf69b23142

View File

@ -0,0 +1,112 @@
Source: pullmoll
Upstream: no
Reason: avoid format string mismatch for 64 bit types on 32/64 bit arch
--- a/newfs_hfs.tproj/newfs_hfs.c
+++ b/newfs_hfs.tproj/newfs_hfs.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <syslog.h>
#include <unistd.h>
+#include <inttypes.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
@@ -203,7 +203,7 @@
if (isdigit(optarg[0])) {
gJournalSize = get_num(optarg);
if (gJournalSize < 512*1024) {
- printf("%s: journal size %lldk too small. Reset to %dk.\n",
+ printf("%s: journal size %" PRId64 "k too small. Reset to %dk.\n",
progname, gJournalSize/1024, JOURNAL_DEFAULT_SIZE/1024);
gJournalSize = JOURNAL_DEFAULT_SIZE;
}
@@ -636,7 +636,7 @@
}
if (bit_index >= 22) {
- fatal("Error: Disk Device is too big (%llu sectors, %d bytes per sector", sectorCount, sectorSize);
+ fatal("Error: Disk Device is too big (%" PRIu64 " sectors, %d bytes per sector", sectorCount, sectorSize);
}
}
else {
@@ -646,7 +646,7 @@
}
if ((sectorCount / (gBlockSize / sectorSize)) > 0xFFFFFFFF) {
- fatal("%s: block size is too small for %lld sectors", optarg, gBlockSize, sectorCount);
+ fatal("%s: block size is too small for %" PRId64 " sectors", optarg, gBlockSize, sectorCount);
}
if (gBlockSize < HFSOPTIMALBLKSIZE) {
@@ -769,7 +769,7 @@
/* Check to see if the disk is too big */
u_int64_t secsize = (u_int64_t) dip.sectorSize;
if (bad_disk_size(dip.totalSectors, secsize)) {
- fatal("%s: partition is too big (maximum is %llu KB)", device, MAXHFSVOLSIZE/1024);
+ fatal("%s: partition is too big (maximum is %" PRIu64 " KB)", device, MAXHFSVOLSIZE/1024);
}
/*
@@ -904,7 +904,7 @@
min_size = dip->physSectorSize * (dip->physSectorSize / BLOCK_INFO_SIZE);
if (gJournalSize < min_size) {
- printf("%s: journal size %lldk too small. Reset to %dk.\n",
+ printf("%s: journal size %" PRId64 "k too small. Reset to %dk.\n",
progname, gJournalSize/1024, JOURNAL_DEFAULT_SIZE/1024);
gJournalSize = 0;
}
@@ -1055,7 +1055,7 @@
if (gNoCreate) {
if (gPartitionSize == 0)
- printf("%llu sectors (%u bytes per sector)\n", dip->physTotalSectors, dip->physSectorSize);
+ printf("%" PRIu64 " sectors (%u bytes per sector)\n", dip->physTotalSectors, dip->physSectorSize);
printf("HFS Plus format parameters:\n");
printf("\tvolume name: \"%s\"\n", gVolumeName);
printf("\tblock-size: %u\n", defaults->blockSize);
--- a/newfs_hfs.tproj/makehfs.c
+++ b/newfs_hfs.tproj/makehfs.c
@@ -55,6 +55,7 @@
#if !LINUX
#include <wipefs.h>
#endif
+#include <inttypes.h>
/*
* CommonCrypto is meant to be a more stable API than OpenSSL.
@@ -1380,10 +1381,10 @@
err(1, NULL);
}
else if (2 == status) {
- err(1, "read (sector %llu)", physSector);
+ err(1, "read (sector %" PRIu64 ")", physSector);
}
else if (3 == status) {
- err(1, "write (sector %llu)", physSector);
+ err(1, "write (sector %" PRIu64 ")", physSector);
}
return;
--- a/fsck_hfs.tproj/dfalib/CatalogCheck.c 2012-02-01 18:17:19.000000000 +0100
+++ b/fsck_hfs.tproj/dfalib/CatalogCheck.c 2019-05-26 13:03:31.395612279 +0200
@@ -25,6 +25,7 @@
#include "DecompDataEnums.h"
#include "DecompData.h"
+#include <inttypes.h>
#include <sys/stat.h>
extern int RcdFCntErr( SGlobPtr GPtr, OSErr type, UInt32 correct, UInt32 incorrect, HFSCatalogNodeID);
@@ -1693,8 +1694,8 @@
} else {
fsckPrint(gScavGlobals->context, E_LEOF, filename);
}
- sprintf(oldSizeStr, "%qd", oldSize);
- sprintf(newSizeStr, "%qd", newSize);
+ sprintf(oldSizeStr, "%" PRIu64, oldSize);
+ sprintf(newSizeStr, "%" PRIu64, newSize);
fsckPrint(gScavGlobals->context, E_BadValue, newSizeStr, oldSizeStr);
/* Only HFS+ is repaired here */