partprobe_SOURCES = partprobe.c
-partprobe_LDADD = @INTLLIBS@ @LIBS@ \
- $(top_builddir)/libparted/libparted.la @PARTED_LIBS@
+partprobe_LDADD = \
+ $(top_builddir)/lib/libparted.la \
+ $(top_builddir)/libparted/libparted.la \
+ $(INTLLIBS) $(LIBS) \
+ $(PARTED_LIBS)
partprobe_LDFLAGS = @PARTEDLDFLAGS@
/*
partprobe - informs the OS kernel of partition layout
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*
* CFLAGS=-Os ./configure --disable-nls --disable-shared --disable-debug
* --enable-discover-only
- *
+ *
* And strip(1) afterwards!
*/
#include <stdio.h>
#include <string.h>
+#include "closeout.h"
+#include "version-etc.h"
+
+#define AUTHORS \
+ "<http://parted.alioth.debian.org/cgi-bin/trac.cgi/browser/AUTHORS>"
+
+/* The official name of this program (e.g., no `g' prefix). */
+#define PROGRAM_NAME "partprobe"
+
+char *program_name;
+
/* initialized to 0 according to the language lawyers */
static int opt_no_probe;
static int opt_summary;
static void
help ()
{
- printf ("usage: partprobe [-d] [-h] [-s] [-v] [DEVICES...]\n\n"
+ printf ("usage: %s [-d] [-h] [-s] [-v] [DEVICES...]\n\n"
"-d don't update the kernel\n"
"-s print a summary of contents\n"
- "-v version info\n");
+ "-v version info\n", PROGRAM_NAME);
}
static void
version ()
{
- printf ("partprobe (" PACKAGE VERSION ")\n");
+ version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, VERSION, AUTHORS,
+ (char *) NULL);
}
int
PedDevice* dev;
int status = 1;
+ program_name = argv[0];
+ atexit (close_stdout);
+
for (i = 1; i < argc; i++) {
if (argv[i][0] != '-') {
dev_passed = 1;
return !status;
}
-