]> err.no Git - util-linux/commitdiff
fdisk: non-linux support (MAXPATHLEN)
authorKarel Zak <kzak@redhat.com>
Mon, 26 Nov 2007 14:19:29 +0000 (15:19 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 26 Nov 2007 14:19:29 +0000 (15:19 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/fdiskbsdlabel.c

index 01912ab52079528be9b82e32276d9a45b90190d5..377b64ec45a0a04969e5780281cd93a5cda6aebb 100644 (file)
@@ -515,7 +515,7 @@ static void
 xbsd_write_bootstrap (void)
 {
   char *bootdir = BSD_LINUX_BOOTDIR;
-  char path[MAXPATHLEN];
+  char path[sizeof(BSD_LINUX_BOOTDIR) + 1 + 2 + 4];  /* BSD_LINUX_BOOTDIR + / + {sd,wd} + boot */
   char *dkbasename;
   struct xbsd_disklabel dl;
   char *d, *p, *e;