Advertisement
Guest User

Patch new option Partimage

a guest
Jul 26th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.85 KB | None | 0 0
  1. Index: main.cpp
  2. ===================================================================
  3. --- main.cpp    (revision 119)
  4. +++ main.cpp    (working copy)
  5. @@ -84,6 +84,7 @@
  6.    {"nocheck", no_argument, NULL, 'c'},
  7.    {"nodesc", no_argument, NULL, 'd'},
  8.    {"erase", no_argument, NULL, 'e'},
  9. +  {"filesystem", required_argument, NULL, 'F'},
  10.    {"finish", required_argument, NULL, 'f'},
  11.    {"debug", required_argument, NULL, 'g'},
  12.    {"help", no_argument, NULL, 'h'},
  13. @@ -110,7 +111,7 @@
  14.  
  15.  static char finish_last_countfile_lock[]="/tmp/partimageXXXXXX.lock";
  16.  static char finish_last_countfile[]="/tmp/partimageXXXXXX";
  17. -static char optstring[]="z:oV:ecmdhf:s:p:bwg:vyLnSMa:iU:P:XB:";
  18. +static char optstring[]="z:oV:ecmdhf:s:p:bwg:vyLnSMa:iU:P:XB:F:";
  19.  FILE * g_fDebug; // debug file
  20.  FILE * g_fLocalDebug; // debug file
  21.  CInterface * g_interface;
  22. @@ -277,6 +278,19 @@
  23.         return EXIT_FAILURE;
  24.           }
  25.         break;
  26. +      
  27. +     case 'F': // get filesystem
  28. +       detectFileSystem(optarg, szFileSystem);
  29. +       fprintf(stdout, i18n("File system: %s\n"), szFileSystem);
  30. +       if(isFileSystemSupported(szFileSystem) == true)
  31. +         {
  32. +           fprintf(stdout, i18n("Supported: yes\n"));
  33. +         }
  34. +       else
  35. +         {
  36. +           fprintf(stdout, i18n("Supported: no\n"));
  37. +         }
  38. +       return EXIT_SUCCESS;
  39.      
  40.       case 'f': // what to do when finished successfully ?
  41.         options.dwFinish = atol(optarg);
  42. @@ -1022,6 +1036,7 @@
  43.           "* -h,  --help          show help\n"
  44.           "* -v,  --version       show version\n"
  45.           "* -i,  --compilinfo    show compilation options used\n"
  46. +         "* -FX, --filesystem    show filesystem for partition X\n"
  47.           "* -f,  --finish        (action to do if finished successfully):\n"
  48.           "  -f0, --finish=0      wait: don't make anything\n"
  49.           "  -f1, --finish=1      halt: power off the computer\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement