diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-01-15 11:27:12 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-01-15 11:27:12 +0000 |
commit | a0092a3d667863341339645f5d0bc9bc4b4b5108 (patch) | |
tree | d9a24e421b0ed945ff3d3bced57634cd68e5776f /perl-install/c/stuff.xs.pl | |
parent | 28a23a084b62594b9acf2d0f4d2dd3e7dad60ed8 (diff) | |
download | drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.gz drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.bz2 drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.tar.xz drakx-backup-do-not-use-a0092a3d667863341339645f5d0bc9bc4b4b5108.zip |
- 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)
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rw-r--r-- | perl-install/c/stuff.xs.pl | 17 |
1 files changed, 15 insertions, 2 deletions
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; |