~ubuntu-branches/ubuntu/lucid/loop-aes-utils/lucid-security

« back to all changes in this revision

Viewing changes to disk-utils/mkfs.c

  • Committer: Bazaar Package Importer
  • Author(s): Max Vozeler
  • Date: 2008-08-22 11:57:17 UTC
  • mfrom: (8.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080822115717-v8wfa8pxwlfvyje0
Tags: 2.13.1-4
* patches/losetup_add_option_f.dpatch: 
  - Added to support "find next free loop" in losetup.
    (closes: #495682)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <unistd.h>
22
22
#include <string.h>
23
23
#include <getopt.h>
24
 
#include "nls.h"
25
 
 
26
 
#define VERSION         UTIL_LINUX_VERSION
 
24
#include <nls.h>
27
25
 
28
26
#ifndef DEFAULT_FSTYPE
29
27
# define DEFAULT_FSTYPE         "ext2"
51
49
 
52
50
  if (argc == 2 &&
53
51
      (!strcmp(argv[1], "-V") || !strcmp(argv[1], "--version"))) {
54
 
          printf(_("%s from %s\n"), program_name, util_linux_version);
 
52
          printf(_("%s (%s)\n"), program_name, PACKAGE_STRING);
55
53
          exit(0);
56
54
  }
57
55
 
94
92
  putenv(newpath);
95
93
 
96
94
  progname = (char *) malloc(sizeof(PROGNAME) + strlen(fstype) + 1);
97
 
  if (!newpath) {
 
95
  if (!progname) {
98
96
    fprintf(stderr, _("%s: Out of memory!\n"), "mkfs");
99
97
    exit(1);
100
98
  }
102
100
  argv[--optind] = progname;
103
101
 
104
102
  if (verbose) {
105
 
    printf(_("mkfs version %s (%s)\n"), VERSION, __DATE__);
 
103
    printf(_("mkfs (%s)\n"), PACKAGE_STRING);
106
104
    i = optind;
107
105
    while (argv[i])
108
106
      printf("%s ", argv[i++]);