mkswap_LDADD = $(uuid_ldadd)
mkswap_CFLAGS = $(AM_CFLAGS) $(uuid_cflags)
+isosize_SOURCES = isosize.c $(top_srcdir)/lib/strutils.c
usrbin_exec_PROGRAMS = isosize
usrsbin_exec_PROGRAMS =
#include "nls.h"
#include "c.h"
+#include "strutils.h"
#define ISODCL(from, to) (to - from + 1)
};
static void
-isosize(char *filenamep, int xflag, int divisor) {
+isosize(char *filenamep, int xflag, long divisor) {
int fd, nsecs, ssize;
struct iso_primary_descriptor ipd;
int
main(int argc, char * argv[]) {
int j, ct, opt, xflag = 0;
- int divisor = 0;
+ long divisor = 0;
static const struct option longopts[] = {
{"divisor", no_argument, 0, 'd'},
while ((opt = getopt_long(argc, argv, "d:xVh", longopts, NULL)) != -1)
switch (opt) {
case 'd':
- divisor = atoi(optarg);
+ divisor =
+ strtol_or_err(optarg,
+ _("invalid divisor argument"));
break;
case 'x':
xflag = 1;