diff options
Diffstat (limited to 'libfdisk/samples/mkpart.c')
-rw-r--r-- | libfdisk/samples/mkpart.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libfdisk/samples/mkpart.c b/libfdisk/samples/mkpart.c index 4ca3ed35d..44a97d6fd 100644 --- a/libfdisk/samples/mkpart.c +++ b/libfdisk/samples/mkpart.c @@ -3,7 +3,24 @@ * * This file may be redistributed under the terms of the * GNU Lesser General Public License. - */ + * + * + * Libfdisk sample to create partitions by specify size, for example: + * + * mkpart --label dos --device /dev/sdc 2M 2M 2M 10M 1M - + * + * creates 6 partitions: + * - 3 primary (3x 2M) + * - 1 extended (1x 10M) + * - 2 logical (1x 1M, 1x remaining-space-in-extended-partition) + * + * Notes: + * The sample specifies size and partno for MBR, and size only for another + * labels (e.g. GPT). + * + * The Ask-API does not use anything else than warning/info. The + * partitionning has to be done non-interactive. + */ #include <stdlib.h> #include <unistd.h> #include <string.h> |