pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Adding Rod Smith's gdisk & friends
Module Name: pkgsrc-wip
Committed By: kerrnel <greg-com-github%akua.com@localhost>
Pushed By: kerrnel
Date: Wed Jan 10 16:32:29 2024 -0500
Changeset: 1f8186e5927bcb106cc99a5da3c6a298ca44b3a6
Added Files:
gptfdisk/COMMIT_MSG
gptfdisk/DESCR
gptfdisk/Makefile
gptfdisk/PLIST
gptfdisk/distinfo
gptfdisk/patches/patch-Makefile
gptfdisk/patches/patch-diskio-unix.cc
gptfdisk/patches/patch-gdisk.cc
gptfdisk/patches/patch-gpt.cc
gptfdisk/patches/patch-gpt.h
gptfdisk/patches/patch-gptcl.cc
gptfdisk/patches/patch-gptcurses.cc
Log Message:
Adding Rod Smith's gdisk & friends
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=1f8186e5927bcb106cc99a5da3c6a298ca44b3a6
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
gptfdisk/COMMIT_MSG | 6 ++
gptfdisk/DESCR | 5 ++
gptfdisk/Makefile | 38 +++++++++
gptfdisk/PLIST | 9 ++
gptfdisk/distinfo | 12 +++
gptfdisk/patches/patch-Makefile | 26 ++++++
gptfdisk/patches/patch-diskio-unix.cc | 156 ++++++++++++++++++++++++++++++++++
gptfdisk/patches/patch-gdisk.cc | 16 ++++
gptfdisk/patches/patch-gpt.cc | 33 +++++++
gptfdisk/patches/patch-gpt.h | 15 ++++
gptfdisk/patches/patch-gptcl.cc | 33 +++++++
gptfdisk/patches/patch-gptcurses.cc | 50 +++++++++++
12 files changed, 399 insertions(+)
diffs:
diff --git a/gptfdisk/COMMIT_MSG b/gptfdisk/COMMIT_MSG
new file mode 100644
index 0000000000..364c8670de
--- /dev/null
+++ b/gptfdisk/COMMIT_MSG
@@ -0,0 +1,6 @@
+sysutils/gptfdisk: Add gdisk / gptfdisk and friends 1.0.9 - tested on amd64 and Darwin (MacOS 14)
+
+Minor changes to the original to get things compiling and pkgsrc linting. sprintf / unused warnings on Darwin are in original.
+
+Per https://www.rodsbooks.com/gdisk/
+GPT fdisk (consisting of the gdisk, cgdisk, sgdisk, and fixparts programs) is a set of text-mode partitioning tools for Linux, FreeBSD, macOS, and Windows. The gdisk, cgdisk, and sgdisk programs work on Globally Unique Identifier (GUID) Partition Table (GPT) disks, rather than on the older (and once more common) Master Boot Record (MBR) partition tables. The fixparts program repairs certain types of damage to MBR disks and enables changing partition types from primary to logical and vice-versa.
diff --git a/gptfdisk/DESCR b/gptfdisk/DESCR
new file mode 100644
index 0000000000..f89607b6a8
--- /dev/null
+++ b/gptfdisk/DESCR
@@ -0,0 +1,5 @@
+gptfdisk (aka gdisk) and freinds curteousy of Rod Smith
+
+GPT hard disk partitioner and fixer
+
+See https://www.rodsbooks.com/gdisk/
diff --git a/gptfdisk/Makefile b/gptfdisk/Makefile
new file mode 100644
index 0000000000..8782fd9316
--- /dev/null
+++ b/gptfdisk/Makefile
@@ -0,0 +1,38 @@
+# $NetBSD$
+
+DISTNAME= gptfdisk-1.0.9
+PKGREVISION= 1
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gptfdisk/1.0.9/}
+# EXTRACT_SUFX= .tar.gz
+
+MAINTAINER= greg-org-netbsd%akua.com@localhost
+HOMEPAGE= https://www.rodsbooks.com/gdisk/
+COMMENT= The standard in gpt partition editing
+LICENSE= gnu-gpl-v2
+
+# GNU_CONFIGURE= no
+# HAS_CONFIGURE= no
+USE_LANGUAGES= c c++
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake
+
+INSTALLATION_DIRS= sbin ${PREFIX}/${PKGMANDIR}
+
+SBIN_FILES+= gdisk cgdisk sgdisk fixparts
+MAN_FILES+= gdisk.8 cgdisk.8 sgdisk.8 fixparts.8
+
+MAKE_PROGRAM= gmake
+
+do-install:
+.for f in ${SBIN_FILES}
+ ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/sbin/${f}
+.endfor
+.for f in ${MAN_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${PKGMANDIR}/${f}
+.endfor
+
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/ncursesw/buildlink3.mk"
+.include "../../devel/popt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gptfdisk/PLIST b/gptfdisk/PLIST
new file mode 100644
index 0000000000..65fff75065
--- /dev/null
+++ b/gptfdisk/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD$
+${PKGMANDIR}/cgdisk.8
+${PKGMANDIR}/fixparts.8
+${PKGMANDIR}/gdisk.8
+${PKGMANDIR}/sgdisk.8
+sbin/cgdisk
+sbin/fixparts
+sbin/gdisk
+sbin/sgdisk
diff --git a/gptfdisk/distinfo b/gptfdisk/distinfo
new file mode 100644
index 0000000000..5c7e323470
--- /dev/null
+++ b/gptfdisk/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+BLAKE2s (gptfdisk-1.0.9.tar.gz) = 87cf7a15ab3ef7a3cfa8b51f5754c0dcb65f0a0319fc45ad77332fa95dac7291
+SHA512 (gptfdisk-1.0.9.tar.gz) = c2489ac7e196cb53b9fdb18d0e421571eca43c366de8922c5c7f550aadf192558e7af69b181c30747d6cf607c1670126223465eaa5e231cc589402d94a4e97a2
+Size (gptfdisk-1.0.9.tar.gz) = 215065 bytes
+SHA1 (patch-Makefile) = d9c31cd4016b01ad4b00a0b4b5884e1667ed7ad0
+SHA1 (patch-diskio-unix.cc) = ddfcd137f18a99cc3fc10c241bc4bf80227e2779
+SHA1 (patch-gdisk.cc) = 0e3511e9e86e2b82c40b3a2ca4f190f0548150ec
+SHA1 (patch-gpt.cc) = 06000620b7ddfc5bbda44f58c3b9010abad0db15
+SHA1 (patch-gpt.h) = 7f94dca6cfba3407bef7189abbc31fd08c24adbe
+SHA1 (patch-gptcl.cc) = 9a11b6758216242525ecc53368f248f85ae8eba9
+SHA1 (patch-gptcurses.cc) = 21a62c5e30ec383d4b3be8b3c55bde0430aea463
diff --git a/gptfdisk/patches/patch-Makefile b/gptfdisk/patches/patch-Makefile
new file mode 100644
index 0000000000..6a63612a6c
--- /dev/null
+++ b/gptfdisk/patches/patch-Makefile
@@ -0,0 +1,26 @@
+$NetBSD$
+
+NetBSD target added
+
+--- Makefile.orig 2022-04-14 23:17:12.000000000 +0000
++++ Makefile
+@@ -34,6 +34,8 @@ ifeq ($(origin TARGET),undefined)
+ TARGET=windows
+ else ifeq ($(DETECTED_OS),FreeBSD)
+ TARGET=freebsd
++ else ifeq ($(DETECTED_OS),NetBSD)
++ TARGET=netbsd
+ else ifeq ($(DETECTED_OS),SunOS)
+ TARGET=solaris
+ endif
+@@ -124,6 +126,10 @@ else ifeq ($(TARGET),freebsd)
+ CXXFLAGS+=-O2 -Wall -D_FILE_OFFSET_BITS=64 -I /usr/local/include
+ LDFLAGS+=-L/usr/local/lib
+ LDLIBS+=-luuid #-licuio
++else ifeq ($(TARGET),netbsd)
++ CXXFLAGS+=-O2 -Wall -D_FILE_OFFSET_BITS=64
++ LDFLAGS+=-L/usr/pkg/lib
++ LDLIBS+=-luuid
+ else ifeq ($(TARGET),macos)
+ FATBINFLAGS=-arch x86_64 -arch arm64 -mmacosx-version-min=10.9
+ THINBINFLAGS=-arch x86_64 -mmacosx-version-min=10.9
diff --git a/gptfdisk/patches/patch-diskio-unix.cc b/gptfdisk/patches/patch-diskio-unix.cc
new file mode 100644
index 0000000000..3419f93f1f
--- /dev/null
+++ b/gptfdisk/patches/patch-diskio-unix.cc
@@ -0,0 +1,156 @@
+$NetBSD$
+
+Moved stat64 & friends to #define and added #if section to select
+
+--- diskio-unix.cc.orig 2022-04-14 23:17:12.000000000 +0000
++++ diskio-unix.cc
+@@ -41,6 +41,26 @@ using namespace std;
+ #define off64_t off_t
+ #endif
+
++#if defined(WIN32)
++#define STAT64_STRUCT __stat64
++#define STAT64_FUNCTION _stat64
++#define FSTAT64_FUNCTION _fstat64
++#define LSEEK64_FUNCTION _lseek64
++#define OFFSET_TYPE _off64_t
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined (__APPLE__)
++#define STAT64_STRUCT stat
++#define STAT64_FUNCTION stat
++#define FSTAT64_FUNCTION fstat
++#define LSEEK64_FUNCTION lseek
++#define OFFSET_TYPE off_t
++#else
++#define STAT64_STRUCT stat64
++#define STAT64_FUNCTION stat64
++#define FSTAT64_FUNCTION fstat64
++#define LSEEK64_FUNCTION lseek64
++#define OFFSET_TYPE off64_t
++#endif
++
+ // Returns the official "real" name for a shortened version of same.
+ // Trivial here; more important in Windows
+ void DiskIO::MakeRealName(void) {
+@@ -52,7 +72,7 @@ void DiskIO::MakeRealName(void) {
+ // work.
+ int DiskIO::OpenForRead(void) {
+ int shouldOpen = 1;
+- struct stat64 st;
++ struct STAT64_STRUCT st;
+
+ if (isOpen) { // file is already open
+ if (openForWrite) {
+@@ -65,7 +85,7 @@ int DiskIO::OpenForRead(void) {
+ if (shouldOpen) {
+ fd = open(realFilename.c_str(), O_RDONLY);
+ if (fd == -1) {
+- cerr << "Problem opening " << realFilename << " for reading! Error is " << errno << ".\n";
++ cerr << "Problem opening " << realFilename << " for reading! Error is " << errno << " (" << strerror(errno) << ")\n";
+ if (errno == EACCES) // User is probably not running as root
+ cerr << "You must run this program as root or use sudo!\n";
+ if (errno == ENOENT)
+@@ -78,11 +98,11 @@ int DiskIO::OpenForRead(void) {
+ } else {
+ isOpen = 0;
+ openForWrite = 0;
+- if (fstat64(fd, &st) == 0) {
++ if (FSTAT64_FUNCTION(fd, &st) == 0) {
+ if (S_ISDIR(st.st_mode))
+ cerr << "The specified path is a directory!\n";
+ #if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \
+- && !defined(__APPLE__)
++ && !defined(__APPLE__) && !defined(__NetBSD__)
+ else if (S_ISCHR(st.st_mode))
+ cerr << "The specified path is a character device!\n";
+ #endif
+@@ -92,7 +112,7 @@ int DiskIO::OpenForRead(void) {
+ cerr << "The specified path is a socket!\n";
+ else
+ isOpen = 1;
+- } // if (fstat64()...)
++ } // if (FSTAT64_FUNCTION()...)
+ #if defined(__linux__) && !defined(EFI)
+ if (isOpen && realFilename.substr(0,4) == "/dev") {
+ ostringstream modelNameFilename;
+@@ -120,7 +140,7 @@ int DiskIO::OpenForWrite(void) {
+
+ // try to open the device; may fail....
+ fd = open(realFilename.c_str(), O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__NetBSD__)
+ // MacOS X requires a shared lock under some circumstances....
+ if (fd < 0) {
+ cerr << "Warning: Devices opened with shared lock will not have their\npartition table automatically reloaded!\n";
+@@ -170,7 +190,7 @@ int DiskIO::GetBlockSize(void) {
+ if (err == 0)
+ blockSize = minfo.dki_lbsize;
+ #endif
+-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__)
+ err = ioctl(fd, DIOCGSECTORSIZE, &blockSize);
+ #endif
+ #ifdef __linux__
+@@ -286,6 +306,16 @@ int DiskIO::DiskSync(void) {
+ << "You should reboot or remove the drive.\n";
+ platformFound++;
+ #endif
++#if defined (__NetBSD__)
++ sleep(2);
++ if (ioctl(fd, DIOCCACHESYNC, &i) == -1)
++ cout << "Error " << errno << " synchronizing cache (" << strerror(errno) << ")\n";
++ else
++ cout << "successfully synchronized\n";
++ cout << "Warning: The kernel may continue to use old or deleted wedges.\n"
++ << "You should reboot or remove the drive.\n";
++ platformFound++;
++#endif
+ #ifdef __linux__
+ sleep(1); // Theoretically unnecessary, but ioctl() fails sometimes if omitted....
+ fsync(fd);
+@@ -311,7 +341,7 @@ int DiskIO::DiskSync(void) {
+ // Note that seeking beyond the end of the file is NOT detected as a failure!
+ int DiskIO::Seek(uint64_t sector) {
+ int retval = 1;
+- off64_t seekTo, sought;
++ OFFSET_TYPE seekTo, sought;
+
+ // If disk isn't open, try to open it....
+ if (!isOpen) {
+@@ -320,7 +350,7 @@ int DiskIO::Seek(uint64_t sector) {
+
+ if (isOpen) {
+ seekTo = sector * (uint64_t) GetBlockSize();
+- sought = lseek64(fd, seekTo, SEEK_SET);
++ sought = LSEEK64_FUNCTION(fd, seekTo, SEEK_SET);
+ if (sought != seekTo) {
+ retval = 0;
+ } // if
+@@ -428,8 +458,8 @@ int DiskIO::Write(void* buffer, int numB
+ // return correct values for disk image files.
+ uint64_t DiskIO::DiskSize(int *err) {
+ uint64_t sectors = 0; // size in sectors
+- off64_t bytes = 0; // size in bytes
+- struct stat64 st;
++ OFFSET_TYPE bytes = 0; // size in bytes
++ struct STAT64_STRUCT st;
+ int platformFound = 0;
+ #ifdef __sun__
+ struct dk_minfo minfo;
+@@ -456,7 +486,7 @@ uint64_t DiskIO::DiskSize(int *err) {
+ sectors = minfo.dki_capacity;
+ platformFound++;
+ #endif
+-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__NetBSD__)
+ *err = ioctl(fd, DIOCGMEDIASIZE, &bytes);
+ long long b = GetBlockSize();
+ sectors = bytes / b;
+@@ -488,7 +518,7 @@ uint64_t DiskIO::DiskSize(int *err) {
+ // file (a QEMU image, dd backup, or what have you) and see what
+ // fstat() gives us....
+ if ((sectors == 0) || (*err == -1)) {
+- if (fstat64(fd, &st) == 0) {
++ if (FSTAT64_FUNCTION(fd, &st) == 0) {
+ bytes = st.st_size;
+ if ((bytes % UINT64_C(512)) != 0)
+ cerr << "Warning: File size is not a multiple of 512 bytes!"
diff --git a/gptfdisk/patches/patch-gdisk.cc b/gptfdisk/patches/patch-gdisk.cc
new file mode 100644
index 0000000000..0ee33a09d5
--- /dev/null
+++ b/gptfdisk/patches/patch-gdisk.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Must have mutable device path to add 'r' if necessary
+
+--- gdisk.cc.orig 2022-04-14 23:17:12.000000000 +0000
++++ gdisk.cc
+@@ -39,7 +39,8 @@ int main(int argc, char* argv[]) {
+ } // if/elseif
+ break;
+ case 2: // basic usage
+- if (theGPT.LoadPartitions(argv[1])) {
++ device = argv[1];
++ if (theGPT.LoadPartitions(device)) {
+ if (theGPT.GetState() != use_gpt)
+ WinWarning();
+ theGPT.MainMenu(argv[1]);
diff --git a/gptfdisk/patches/patch-gpt.cc b/gptfdisk/patches/patch-gpt.cc
new file mode 100644
index 0000000000..5720bff94d
--- /dev/null
+++ b/gptfdisk/patches/patch-gpt.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Switch from chosen block to raw (character) device automagically for the user on NetBSD
+
+--- gpt.cc.orig 2022-04-14 23:17:12.000000000 +0000
++++ gpt.cc
+@@ -828,11 +828,25 @@ void GPTData::PartitionScan(void) {
+ } // GPTData::PartitionScan()
+
+ // Read GPT data from a disk.
+-int GPTData::LoadPartitions(const string & deviceFilename) {
++int GPTData::LoadPartitions(string & deviceFilename) {
+ BSDData bsdDisklabel;
+ int err, allOK = 1;
+ MBRValidity mbrState;
+
++#ifdef __NetBSD__ // Always use character device if given block
++ // Convert /dev/wd0 to /dev/rwd0
++ size_t start_pos = deviceFilename.find("/dev/");
++ if (start_pos == 0)
++ {
++ start_pos = deviceFilename.find("/dev/r");
++ if (start_pos == std::string::npos)
++ {
++ deviceFilename.replace(0, 5, string("/dev/r"));
++ cout << "Using raw device at " << deviceFilename.c_str() << "\n";
++ }
++ }
++#endif // __NetBSD__
++
+ if (myDisk.OpenForRead(deviceFilename)) {
+ err = myDisk.OpenForWrite(deviceFilename);
+ if ((err == 0) && (!justLooking)) {
diff --git a/gptfdisk/patches/patch-gpt.h b/gptfdisk/patches/patch-gpt.h
new file mode 100644
index 0000000000..09307f07ed
--- /dev/null
+++ b/gptfdisk/patches/patch-gpt.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Mutable device path prototyped
+
+--- gpt.h.orig 2022-04-14 23:17:12.000000000 +0000
++++ gpt.h
+@@ -114,7 +114,7 @@ public:
+ int LoadMBR(const std::string & f) {return protectiveMBR.ReadMBRData(f);}
+ int WriteProtectiveMBR(void) {return protectiveMBR.WriteMBRData(&myDisk);}
+ void PartitionScan(void);
+- int LoadPartitions(const std::string & deviceFilename);
++ int LoadPartitions(std::string & deviceFilename);
+ int ForceLoadGPTData(void);
+ int LoadMainTable(void);
+ int LoadSecondTableAsMain(void);
diff --git a/gptfdisk/patches/patch-gptcl.cc b/gptfdisk/patches/patch-gptcl.cc
new file mode 100644
index 0000000000..3b5ceea9f6
--- /dev/null
+++ b/gptfdisk/patches/patch-gptcl.cc
@@ -0,0 +1,33 @@
+$NetBSD$
+
+Maybe a no-op in progress to mutable device path
+
+--- gptcl.cc.orig 2022-04-14 19:17:12.000000000 -0400
++++ gptcl.cc
+@@ -65,7 +65,7 @@
+ // 8 = disk replication operation (-R) failed
+ int GPTDataCL::DoOptions(int argc, char* argv[]) {
+ GPTData secondDevice;
+- int opt, numOptions = 0, saveData = 0, neverSaveData = 0;
++ int opt, saveData = 0, neverSaveData = 0;
+ int partNum = 0, newPartNum = -1, saveNonGPT = 1, retval = 0, pretend = 0;
+ int byteSwapPartNum = 0;
+ uint64_t low, high, startSector, endSector, sSize, mainTableLBA;
+@@ -151,7 +151,6 @@
+ default:
+ break;
+ } // switch
+- numOptions++;
+ } // while
+
+ // Assume first non-option argument is the device filename....
+@@ -161,7 +160,8 @@
+ if (device != NULL) {
+ JustLooking(); // reset as necessary
+ BeQuiet(); // Tell called functions to be less verbose & interactive
+- if (LoadPartitions((string) device)) {
++ string devstr = device;
++ if (LoadPartitions(devstr)) {
+ if ((WhichWasUsed() == use_mbr) || (WhichWasUsed() == use_bsd))
+ saveNonGPT = 0; // flag so we don't overwrite unless directed to do so
+ sSize = GetBlockSize();
diff --git a/gptfdisk/patches/patch-gptcurses.cc b/gptfdisk/patches/patch-gptcurses.cc
new file mode 100644
index 0000000000..26c471d207
--- /dev/null
+++ b/gptfdisk/patches/patch-gptcurses.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+Use inttypes.h for printing 64 bit numbers compatibly
+
+--- gptcurses.cc.orig 2022-04-14 19:17:12.000000000 -0400
++++ gptcurses.cc
+@@ -30,6 +30,7 @@
+ #endif
+ #include "gptcurses.h"
+ #include "support.h"
++#include <inttypes.h>
+
+ using namespace std;
+
+@@ -333,13 +334,13 @@
+ printw("Partition GUID code: %s (%s)\n", partitions[partNum].GetType().AsString().c_str(),
+ partitions[partNum].GetTypeName().c_str());
+ printw("Partition unique GUID: %s\n", partitions[partNum].GetUniqueGUID().AsString().c_str());
+- printw("First sector: %lld (at %s)\n", partitions[partNum].GetFirstLBA(),
++ printw("First sector: %" PRId64 " (at %s)\n", partitions[partNum].GetFirstLBA(),
+ BytesToIeee(partitions[partNum].GetFirstLBA(), blockSize).c_str());
+- printw("Last sector: %lld (at %s)\n", partitions[partNum].GetLastLBA(),
++ printw("Last sector: %" PRId64 " (at %s)\n", partitions[partNum].GetLastLBA(),
+ BytesToIeee(partitions[partNum].GetLastLBA(), blockSize).c_str());
+ size = partitions[partNum].GetLastLBA() - partitions[partNum].GetFirstLBA() + 1;
+- printw("Partition size: %lld sectors (%s)\n", size, BytesToIeee(size, blockSize).c_str());
+- printw("Attribute flags: %016llx\n", partitions[partNum].GetAttributes().GetAttributes());
++ printw("Partition size: %" PRId64 " sectors (%s)\n", size, BytesToIeee(size, blockSize).c_str());
++ printw("Attribute flags: %016" PRIX64 "\n", partitions[partNum].GetAttributes().GetAttributes());
+ #ifdef USE_UTF16
+ partitions[partNum].GetDescription().extract(0, NAME_SIZE , temp, NAME_SIZE );
+ printw("Partition name: '%s'\n", temp);
+@@ -447,7 +448,7 @@
+ clrtoeol();
+ newFirstLBA = currentSpace->firstLBA;
+ Align(&newFirstLBA);
+- printw("First sector (%lld-%lld, default = %lld): ", newFirstLBA, currentSpace->lastLBA, newFirstLBA);
++ printw("First sector (%" PRId64 "-%" PRId64 ", default = %" PRId64 "): ", newFirstLBA, currentSpace->lastLBA, newFirstLBA);
+ echo();
+ getnstr(inLine, 79);
+ noecho();
+@@ -461,7 +462,7 @@
+ while ((newLastLBA > currentSpace->lastLBA) || (newLastLBA < newFirstLBA)) {
+ move(LINES - 3, 0);
+ clrtoeol();
+- printw("Size in sectors or {KMGTP} (default = %lld): ", size);
++ printw("Size in sectors or {KMGTP} (default = %" PRId64 "): ", size);
+ echo();
+ getnstr(inLine, 79);
+ noecho();
Home |
Main Index |
Thread Index |
Old Index