| 1880 | }; |
| 1881 | |
| 1882 | static void usage(const char *name) |
| 1883 | { |
| 1884 | printf("ifwitool: Utility for IFWI manipulation\n\n" |
| 1885 | "USAGE:\n" |
| 1886 | " %s [-h]\n" |
| 1887 | " %s FILE COMMAND [PARAMETERS]\n\n" |
| 1888 | "COMMANDs:\n" |
| 1889 | " add -f FILE -n NAME [-d -e ENTRY] [-s]\n" |
| 1890 | " create -f FILE [-s]\n" |
| 1891 | " delete -n NAME [-s]\n" |
| 1892 | " extract -f FILE -n NAME [-d -e ENTRY] [-s]\n" |
| 1893 | " print [-d] [-s]\n" |
| 1894 | " replace -f FILE -n NAME [-d -e ENTRY] [-s]\n" |
| 1895 | "OPTIONs:\n" |
| 1896 | " -f FILE : File to read/write/create/extract\n" |
| 1897 | " -s : Use the second Logical Boot Partition\n" |
| 1898 | " -d : Perform directory operation\n" |
| 1899 | " -e ENTRY: Name of directory entry to operate on\n" |
| 1900 | " -v : Verbose level\n" |
| 1901 | " -h : Help message\n" |
| 1902 | " -n NAME : Name of sub-partition to operate on\n", |
| 1903 | name, name |
| 1904 | ); |
| 1905 | |
| 1906 | printf("\nNAME should be one of:\n"); |
| 1907 | int i; |
| 1908 | for (i = 0; i < MAX_SUBPARTS; i++) |
| 1909 | printf("%s(%s)\n", subparts[i].name, subparts[i].readable_name); |
| 1910 | printf("\n"); |
| 1911 | } |
| 1912 | |
| 1913 | int main(int argc, char **argv) |
| 1914 | { |