From 1137ce0726a7997fe9e5cb2941e3f43bfec9d0e8 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 31 May 2019 19:36:03 +0200 Subject: Update documentation Signed-off-by: David Oberhollenzer --- doc/gensquashfs.1 | 31 ++++++++++++++++++++----------- mkfs/options.c | 5 +++-- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/doc/gensquashfs.1 b/doc/gensquashfs.1 index a1150dd..4b739fd 100644 --- a/doc/gensquashfs.1 +++ b/doc/gensquashfs.1 @@ -1,16 +1,25 @@ -.TH GENSQUASHFS "1" "May 2019" "generate squashfs images" "User Commands" +.TH GENSQUASHFS "1" "June 2019" "generate squashfs images" "User Commands" .SH NAME gensquashfs \- generate squashfs images .SH SYNOPSIS .B gensquashfs -[\fI\,OPTIONS\/\fR] \fI\, \/\fR +[\fI\,OPTIONS\/\fR] \/\fR .SH DESCRIPTION -The first argument is a file containing a listing of all entries to include -in the squashfs image. -.PP -The second argument is the file name of the SquashFS image to generate. +Generate a SquashFS image. .SH OPTIONS .TP +\fB\-\-pack\-file\fR, \fB\-F\fR +Use a \fBgen_init_cpio\fR style description file. The file format is specified +below. If \fB\-\-pack\-dir\fR is used, input file paths are relative to the +pack directory, otherwise they are relative to the directory the pack file +is in. +.TP +\fB\-\-pack\-dir\fR, \fB\-D\fR +If \fB\-\-pack\-file\fR is used, this is the root path relative to which to +read files. If no pack file is specified, pack the contents of the given +directory into a SquashFS image. The directory becomes the root of the file +system. +.TP \fB\-\-compressor\fR, \fB\-c\fR Select the compressor to use (defaults to 'xz'). Run \fBgensquashfs \-\-help\fR to get a list of all available compressors. @@ -92,9 +101,9 @@ l l rd. ;Absolute path of the entry in the image. ;T{ -Optional location of the input file. Can be specified -relative to the description file. If omitted, the -image path is used, relative to the description file. +Optional location of the input file. Can be specified relative to either the +description file or the pack directory. If omitted, the image path is used +as a relative path. T} ;Symlink target. ;Mode/permissions of the entry. @@ -116,10 +125,10 @@ nod /dev/console 0600 0 0 c 5 1 dir /root 0700 0 0 dir /sbin 0755 0 0 -# Add a file. Input is relative to this listing. +# Add a file. Input is relative to pack dir or listing path file /sbin/init 0755 0 0 ../init/sbin/init -# Read from ./bin/bash. +# Read from ./bin/bash relative to pack dir or listing path # /bin is created implicitly with default attributes. file /bin/bash 0755 0 0 .fi diff --git a/mkfs/options.c b/mkfs/options.c index f64ec94..272e860 100644 --- a/mkfs/options.c +++ b/mkfs/options.c @@ -128,10 +128,11 @@ static const char *help_string = " dir /root 0700 0 0\n" " dir /sbin 0755 0 0\n" " \n" -" # Add a file. Input is relative to this listing.\n" +" # Add a file. Input is relative to listing or pack dir.\n" " file /sbin/init 0755 0 0 ../init/sbin/init\n" " \n" -" # Read from bin/bash relative to the listing. Implicitly create /bin.\n" +" # Read bin/bash, relative to listing or pack dir.\n" +" # Implicitly create /bin.\n" " file /bin/bash 0755 0 0" "\n\n"; -- cgit v1.2.3