IS_DEVICE (device, -1);
- strcpy (buf, "/sbin/sfdisk --no-reread");
+ strcpy (buf, "/sbin/sfdisk");
if (n > 0)
sprintf (buf + strlen (buf), " -N %d", n);
if (cyls)
/* Safe because of IS_DEVICE above: */
sprintf (buf + strlen (buf), " %s", device);
+ if (verbose)
+ printf ("%s\n", buf);
+
fp = popen (buf, "w");
if (fp == NULL) {
reply_with_perror (buf);
}
int
-do_sfdisk (const char *device, int cyls, int heads, int sectors,
- char * const* const lines)
+do_sfdisk (char *device, int cyls, int heads, int sectors,
+ char **lines)
{
return sfdisk (device, 0, cyls, heads, sectors, lines);
}
int
-do_sfdisk_N (const char *device, int n, int cyls, int heads, int sectors,
- const char *line)
+do_sfdisk_N (char *device, int n, int cyls, int heads, int sectors,
+ char *line)
{
const char *lines[2] = { line, NULL };
}
char *
-do_sfdisk_l (const char *device)
+do_sfdisk_l (char *device)
{
return sfdisk_flag (device, "-l");
}
char *
-do_sfdisk_kernel_geometry (const char *device)
+do_sfdisk_kernel_geometry (char *device)
{
return sfdisk_flag (device, "-g");
}
char *
-do_sfdisk_disk_geometry (const char *device)
+do_sfdisk_disk_geometry (char *device)
{
return sfdisk_flag (device, "-G");
}