summaryrefslogtreecommitdiffstats
path: root/rescue/kernel_read_part.c
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-08-01 17:20:30 +0000
committerMystery Man <unknown@mandriva.org>2002-08-01 17:20:30 +0000
commit10e8a05be15a93ecb30d80420a7df79a41df0b6f (patch)
tree0fe3a8fe9665e857dcea7c8d35b539ab0295a6fa /rescue/kernel_read_part.c
parent20bc98cdccfed607ee0c3050a3a3bd196c0a1d38 (diff)
downloaddrakx-1_1_9_1mdk.tar
drakx-1_1_9_1mdk.tar.gz
drakx-1_1_9_1mdk.tar.bz2
drakx-1_1_9_1mdk.tar.xz
drakx-1_1_9_1mdk.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_9_1mdk'.V1_1_9_1mdk
Diffstat (limited to 'rescue/kernel_read_part.c')
-rw-r--r--rescue/kernel_read_part.c26
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]);
-}