~jakub/helenos/ia64-revival

« back to all changes in this revision

Viewing changes to uspace/app/bdsh/cmds/modules/mkfile/mkfile.c

  • Committer: Jakub Jermar
  • Date: 2011-04-13 14:45:41 UTC
  • mfrom: (527.1.397 main-clone)
  • Revision ID: jakub@jermar.eu-20110413144541-x0j3r1zxqhsljx1o
MergeĀ mainlineĀ changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
        argc = cli_count_args(argv);
125
125
 
126
126
        for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
127
 
                c = getopt_long(argc, argv, "pvhVfm:", long_options, &opt_ind);
 
127
                c = getopt_long(argc, argv, "s:h", long_options, &opt_ind);
128
128
                switch (c) {
129
129
                case 'h':
130
130
                        help_cmd_mkfile(HELP_LONG);
167
167
                to_write = min(file_size - total_written, BUFFER_SIZE);
168
168
                rc = write(fd, buffer, to_write);
169
169
                if (rc <= 0) {
170
 
                        printf("%s: Error writing file (%d).\n", cmdname, rc);
 
170
                        printf("%s: Error writing file (%zd).\n", cmdname, rc);
171
171
                        close(fd);
172
172
                        return CMD_FAILURE;
173
173
                }
176
176
 
177
177
        rc = close(fd);
178
178
        if (rc != 0) {
179
 
                printf("%s: Error writing file (%d).\n", cmdname, rc);
 
179
                printf("%s: Error writing file (%zd).\n", cmdname, rc);
180
180
                return CMD_FAILURE;
181
181
        }
182
182