]>
Commit | Line | Data |
---|---|---|
f1b1f669 | 1 | --- partimage-0.6.8/src/client/main.cpp~ 2009-09-24 19:49:45.000000000 +0000 |
2 | +++ partimage-0.6.8/src/client/main.cpp 2009-10-13 16:57:56.000000000 +0000 | |
3 | @@ -83,6 +83,7 @@ | |
4 | {"fully-batch", required_argument, NULL, 'B'}, | |
5 | {"nocheck", no_argument, NULL, 'c'}, | |
6 | {"nodesc", no_argument, NULL, 'd'}, | |
7 | + {"description",required_argument, NULL, 'D'}, | |
8 | {"erase", no_argument, NULL, 'e'}, | |
9 | {"finish", required_argument, NULL, 'f'}, | |
10 | {"debug", required_argument, NULL, 'g'}, | |
11 | @@ -110,7 +111,7 @@ | |
12 | ||
13 | static char finish_last_countfile_lock[]="/tmp/partimageXXXXXX.lock"; | |
14 | static char finish_last_countfile[]="/tmp/partimageXXXXXX"; | |
15 | -static char optstring[]="z:oV:ecmdhf:s:p:bwg:vyLnSMa:iU:P:XB:"; | |
16 | +static char optstring[]="z:oV:ecmdhf:s:p:bwg:vynSMa:iU:P:XB:D:"; | |
17 | FILE * g_fDebug; // debug file | |
18 | FILE * g_fLocalDebug; // debug file | |
19 | CInterface * g_interface; | |
20 | @@ -313,6 +314,12 @@ | |
21 | case 'd': // don't ask any description | |
22 | options.bAskDesc = false; | |
23 | break; | |
24 | + | |
25 | + case 'D': // description in batch mode | |
26 | + strncpy(options.szDescription, optarg, MAX_DESCRIPTION); | |
27 | + *(options.szDescription+MAX_DESCRIPTION-1) = '\0'; | |
28 | + options.bAskDesc = false; | |
29 | + break; | |
30 | ||
31 | case 'h': // help | |
32 | usage(); | |
33 | @@ -1002,6 +1009,7 @@ | |
34 | "* -c, --nocheck don't check the partition before saving\n" | |
35 | "* -o, --overwrite overwrite the existing image file without confirmation\n" | |
36 | "* -d, --nodesc don't ask any description for the image file\n" | |
37 | + "* -DX, --description=X set image description in batch mode\n" | |
38 | "* -V, --volume (split image into multiple volumes files)\n" | |
39 | " -VX, --volume=X create volumes with a size of X MB\n" | |
40 | "* -w, --waitvol wait for a confirmation after each volume change\n" | |
41 | --- partimage-0.6.8/src/client/misc.cpp~ 2009-10-13 16:53:57.000000000 +0000 | |
42 | +++ partimage-0.6.8/src/client/misc.cpp 2009-10-13 17:00:51.000000000 +0000 | |
43 | @@ -437,6 +437,10 @@ | |
44 | g_interface -> askDescription(headMain.szPartDescription, | |
45 | MAX_DESCRIPTION); | |
46 | } | |
47 | + else if (strlen(options->szDescription)>0) | |
48 | + { | |
49 | + strcpy(headMain.szPartDescription,options->szDescription); | |
50 | + } | |
51 | ||
52 | // bzip2 bug workaround | |
53 | if ((options->dwCompression == COMPRESS_BZIP2) | |
54 | --- partimage-0.6.8/src/shared/common.h~ 2009-09-24 19:21:42.000000000 +0000 | |
55 | +++ partimage-0.6.8/src/shared/common.h 2009-10-13 17:02:59.000000000 +0000 | |
56 | @@ -143,6 +143,7 @@ | |
57 | char szUserName[MAX_USERNAMELEN]; | |
58 | char szPassWord[MAX_PASSWORDLEN]; | |
59 | char szFullyBatchMode[2048]; | |
60 | + char szDescription[MAX_DESCRIPTION]; | |
61 | }; | |
62 | ||
63 | #define MAX_UNAMEINFOLEN 65 //SYS_NMLN |