~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to src/truncate.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* truncate -- truncate or extend the length of files.
2
 
   Copyright (C) 2008-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 2008-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
102
102
If a FILE is larger than the specified size, the extra data is lost.\n\
103
103
If a FILE is shorter, it is extended and the extended part (hole)\n\
104
104
reads as zero bytes.\n\
105
 
\n\
106
 
"), stdout);
107
 
      fputs (_("\
108
 
Mandatory arguments to long options are mandatory for short options too.\n\
109
 
"), stdout);
 
105
"), stdout);
 
106
 
 
107
      emit_mandatory_arg_note ();
 
108
 
110
109
      fputs (_("\
111
110
  -c, --no-create        do not create any files\n\
112
111
"), stdout);
415
414
          errors |= !do_ftruncate (fd, fname, size, rsize, rel_mode);
416
415
          if (close (fd) != 0)
417
416
            {
418
 
              error (0, errno, _("closing %s"), quote (fname));
 
417
              error (0, errno, _("failed to close %s"), quote (fname));
419
418
              errors = true;
420
419
            }
421
420
        }