Commit 7998d1d3 authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Peter Korsgaard
Browse files

sfdisk: remove deprecated

parent f5e5aeb7
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -199,10 +199,6 @@ source "package/picocom/Config.in"
source "package/rng-tools/Config.in"
source "package/sdparm/Config.in"
source "package/setserial/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
# busybox has fdisk
source "package/sfdisk/Config.in"
endif
source "package/smartmontools/Config.in"
source "package/squashfs/Config.in"
source "package/squashfs3/Config.in"

package/sfdisk/Config.in

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
config BR2_PACKAGE_SFDISK
	bool "sfdisk"
	depends on BR2_DEPRECATED
	help
	  Partition table manipulator for Linux.
+0 −12
Original line number Diff line number Diff line
--- sfdisk/sfdisk.c.oorig	2006-10-09 16:24:06.000000000 +0200
+++ sfdisk/sfdisk.c	2006-10-09 16:24:20.000000000 +0200
@@ -47,6 +47,9 @@
 #include <sys/stat.h>
 #include <sys/utsname.h>
 #ifdef __linux__
+#define _LIBC
+#include <sys/syscall.h>
+#undef _LIBC
 #include <linux/unistd.h>	/* _syscall */
 #endif
 #include "nls.h"
+0 −21
Original line number Diff line number Diff line
diff -ur sfdisk_vanilla/sfdisk.c sfdisk_llseek-fix/sfdisk.c
--- sfdisk_vanilla/sfdisk.c	2004-01-13 13:03:11.000000000 +0000
+++ sfdisk_llseek-fix/sfdisk.c	2008-04-17 08:42:35.000000000 +0000
@@ -134,9 +137,17 @@
  * Note: we use 512-byte sectors here, irrespective of the hardware ss.
  */
 #if defined(__linux__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
+#if defined(_llseek)
 static
 _syscall5(int,  _llseek,  unsigned int,  fd, ulong, hi, ulong, lo,
        loff_t *, res, unsigned int, wh);
+#else
+static int _llseek (unsigned int fd, unsigned long oh,
+		unsigned long ol, long long *result,
+		unsigned int origin) {
+	return syscall (__NR__llseek, fd, oh, ol, result, origin);
+#endif
+}
 #endif
 
 static int
+0 −45
Original line number Diff line number Diff line
diff -ru sfdisk_vanilla/sfdisk.c sfdisk_index-rindex-fix/sfdisk.c
--- sfdisk_vanilla/sfdisk.c	2004-01-13 13:03:11.000000000 +0000
+++ sfdisk_index-rindex-fix/sfdisk.c	2008-04-17 13:44:40.000000000 +0000
@@ -40,7 +40,7 @@
 #include <unistd.h>		/* read, write */
 #include <fcntl.h>		/* O_RDWR */
 #include <errno.h>		/* ERANGE */
-#include <string.h>		/* index() */
+#include <string.h>		/* strchr, strrchr */
 #include <ctype.h>
 #include <getopt.h>
 #include <sys/ioctl.h>
@@ -1672,12 +1672,12 @@
 	eof = 1;
 	return RD_EOF;
     }
-    if (!(lp = index(lp, '\n')))
+    if (!(lp = strchr(lp, '\n')))
       fatal(_("long or incomplete input line - quitting\n"));
     *lp = 0;
 
     /* remove comments, if any */
-    if ((lp = index(line+2, '#')) != 0)
+    if ((lp = strchr(line+2, '#')) != 0)
       *lp = 0;
 
     /* recognize a few commands - to be expanded */
@@ -1687,7 +1687,7 @@
     }
 
     /* dump style? - then bad input is fatal */
-    if ((ip = index(line+2, ':')) != 0) {
+    if ((ip = strchr(line+2, ':')) != 0) {
 	struct dumpfld *d;
 
       nxtfld:
@@ -2436,7 +2436,7 @@
 
     if (argc < 1)
       fatal(_("no command?\n"));
-    if ((progn = rindex(argv[0], '/')) == NULL)
+    if ((progn = strrchr(argv[0], '/')) == NULL)
       progn = argv[0];
     else
       progn++;
Loading