diff options
author | Mystery Man <unknown@mandriva.org> | 2001-06-11 13:49:39 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2001-06-11 13:49:39 +0000 |
commit | 16bde8b3d7027aba56051fbf557b7735eb2ee6aa (patch) | |
tree | 0d8736af65eea4a83b8445ee8e2a6d0c951aea67 /rescue/kernel_read_part.c | |
parent | 0a121a8ecd6de894c14d60daf9da2022ec47405c (diff) | |
download | drakx-topic/rp-pppoe.tar drakx-topic/rp-pppoe.tar.gz drakx-topic/rp-pppoe.tar.bz2 drakx-topic/rp-pppoe.tar.xz drakx-topic/rp-pppoe.zip |
This commit was manufactured by cvs2svn to create branch 'rp-pppoe'.topic/rp-pppoe
Diffstat (limited to 'rescue/kernel_read_part.c')
-rw-r--r-- | rescue/kernel_read_part.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/rescue/kernel_read_part.c b/rescue/kernel_read_part.c deleted file mode 100644 index 279dfe787..000000000 --- a/rescue/kernel_read_part.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <stdio.h> -#include <sys/mount.h> -#include <fcntl.h> - -void die(char *msg) -{ - perror(msg); - exit(1); -} - -void kernel_read(char *dev) -{ - int fd; - if ((fd = open(dev, O_RDONLY)) == -1) die("can't open device"); - ioctl(fd, BLKRRPART, 0); - close(fd); -} - -int main(int argc, char **argv) -{ - if (argc != 2) { - fprintf(stderr, "usage: kernel_read_part <hard drive device>\n"); - exit(1); - } - kernel_read(argv[1]); -} |