summaryrefslogtreecommitdiff
path: root/sbin/fdisk/cmd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-16 10:35:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-10-16 10:35:07 +0000
commite18ada7a5a86b022159122b289a55197f022e7cd (patch)
tree463fb38cbd86cc7580f0a4ba06dfd38f5dd2aef1 /sbin/fdisk/cmd.c
parentc3902b66f635baccbb889973ba164731932ba95c (diff)
new command: manual
Diffstat (limited to 'sbin/fdisk/cmd.c')
-rw-r--r--sbin/fdisk/cmd.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sbin/fdisk/cmd.c b/sbin/fdisk/cmd.c
index dd1d55cfa3f..4dce5bc6ac7 100644
--- a/sbin/fdisk/cmd.c
+++ b/sbin/fdisk/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.6 1997/10/16 01:47:08 deraadt Exp $ */
+/* $OpenBSD: cmd.c,v 1.7 1997/10/16 10:35:05 deraadt Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -373,3 +373,22 @@ Xflag(cmd, disk, mbr, tt, offset)
return(CMD_DIRTY);
}
+int
+Xmanual(cmd, disk, mbr, tt, offset)
+ cmd_t *cmd;
+ disk_t *disk;
+ mbr_t *mbr;
+ mbr_t *tt;
+ int offset;
+{
+ extern char manpage[];
+ FILE *f;
+
+ f = popen("/usr/bin/less", "w");
+ if (f) {
+ (void) fwrite(manpage, strlen(manpage), 1, f);
+ pclose(f);
+ }
+
+ return (CMD_CONT);
+}