+2009-11-15 Robert Millan <rmh.grub@aybabtu.com>
+
+ Support --version in grub-mkisofs.
+
+ * util/mkisofs/mkisofs.c (rcsid): Remove variable.
+ (OPTION_VERSION): New macro.
+ (ld_options): Recognize --version.
+ (usage): Move `program_name' from here ...
+ (program_name): ... to here. Add `static' qualifier.
+ (main): Recognize `OPTION_VERSION'.
+
2009-11-15 Felix Zielcke <fzielcke@z-51.de>
* Makefile.in (TARGET_CPPFLAGS): Replace `-isystem=$(srcdir)/include'
along with this program; if not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-static char rcsid[] ="$Id: mkisofs.c,v 1.32 1999/03/07 21:48:49 eric Exp $";
+static const char *program_name = "grub-mkisofs";
#include <errno.h>
#include "config.h"
#define OPTION_NO_EMUL_BOOT 171
#define OPTION_ELTORITO_EMUL_FLOPPY 172
+#define OPTION_VERSION 173
+
static const struct ld_option ld_options[] =
{
{ {"all-files", no_argument, NULL, 'a'},
'\0', NULL, "Print option help", ONE_DASH },
{ {"help", no_argument, NULL, OPTION_HELP},
'\0', NULL, "Print option help", TWO_DASHES },
+ { {"version", no_argument, NULL, OPTION_VERSION},
+ '\0', NULL, "Print version information and exit", TWO_DASHES },
{ {"hide", required_argument, NULL, OPTION_I_HIDE},
'\0', "GLOBFILE", "Hide ISO9660/RR file" , ONE_DASH },
{ {"hide-joliet", required_argument, NULL, OPTION_J_HIDE},
#endif
void usage(){
- const char * program_name = "mkisofs";
-#if 0
- fprintf(stderr,"Usage:\n");
- fprintf(stderr,
-"mkisofs [-o outfile] [-R] [-V volid] [-v] [-a] \
-[-T]\n [-l] [-d] [-V] [-D] [-L] [-p preparer]"
-"[-P publisher] [ -A app_id ] [-z] \n \
-[-b boot_image_name] [-c boot_catalog-name] \
-[-x path -x path ...] path\n");
-#endif
-
unsigned int i;
/* const char **targets, **pp;*/
usage ();
exit (0);
break;
+ case OPTION_VERSION:
+ printf ("%s (%s %s)\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
+ exit (0);
+ break;
case OPTION_NOSPLIT_SL_COMPONENT:
split_SL_component = 0;
break;