From a0092a3d667863341339645f5d0bc9bc4b4b5108 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 15 Jan 2004 11:27:12 +0000 Subject: - remove the use of BLKRRPART (telling the kernel to re-read the partition table) in most cases - replace with tell_kernel() and will_tell_kernel() - correctly handle in standalone the need to reboot, with no way to forget it (telling the WM to quit nicely then call reboot when it's done) --- perl-install/c/stuff.xs.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'perl-install/c/stuff.xs.pl') diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index dc162af36..ec4047b0c 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -229,11 +229,24 @@ dgettext(domainname, msgid) char * msgid int -add_partition(hd, start_sector, size_sector, part_number) +del_partition(hd, part_number) int hd + int part_number + CODE: + { + struct blkpg_partition p = { 0, 0, part_number, "", "" }; + struct blkpg_ioctl_arg s = { BLKPG_DEL_PARTITION, 0, sizeof(struct blkpg_partition), (void *) &p }; + RETVAL = ioctl(hd, BLKPG, &s) == 0; + } + OUTPUT: + RETVAL + +int +add_partition(hd, part_number, start_sector, size_sector) + int hd + int part_number unsigned long start_sector unsigned long size_sector - int part_number CODE: { long long start = start_sector * 512; -- cgit v1.2.1