From: Miklos Szeredi Date: Wed, 9 Apr 2008 13:23:36 +0000 (+0000) Subject: Update warning message for missing newline at end of fuse.conf X-Git-Tag: fuse_2_8_0_pre2~20 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bd9bf9c8cee576c4b93702c788b34b1fe0372580;p=qemu-gpiodev%2Flibfuse.git Update warning message for missing newline at end of fuse.conf --- diff --git a/ChangeLog b/ChangeLog index 4d75d55..7a2344e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-09 Miklos Szeredi + + * Update warning message for missing newline at end of fuse.conf + + * Update debug message for successful operation to not include the + string "error:" + 2008-04-08 Miklos Szeredi * Update error message for missing mountpoint parameter. Reported diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index d4941b4..bae6199 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -167,11 +167,18 @@ static int send_reply_iov(fuse_req_t req, int error, struct iovec *iov, iov[0].iov_len = sizeof(struct fuse_out_header); out.len = iov_length(iov, count); - if (req->f->debug) - fprintf(stderr, - " unique: %llu, error: %i (%s), outsize: %i\n", - (unsigned long long) out.unique, out.error, - strerror(-out.error), out.len); + if (req->f->debug) { + if (out.error) { + fprintf(stderr, + " unique: %llu, error: %i (%s), outsize: %i\n", + (unsigned long long) out.unique, out.error, + strerror(-out.error), out.len); + } else { + fprintf(stderr, + " unique: %llu, success, outsize: %i\n", + (unsigned long long) out.unique, out.len); + } + } res = fuse_chan_send(req->ch, iov, count); free_req(req); diff --git a/util/fusermount.c b/util/fusermount.c index 12e0c9f..773de36 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -229,15 +229,20 @@ static void read_conf(void) strip_line(line); parse_line(line, linenum); } else { - fprintf(stderr, "%s: reading %s: line %i too long\n", - progname, FUSE_CONF, linenum); isnewline = 0; } - } else if(line[strlen(line)-1] == '\n') + } else if(line[strlen(line)-1] == '\n') { + fprintf(stderr, "%s: reading %s: line %i too long\n", progname, FUSE_CONF, linenum); + isnewline = 1; + } if (isnewline) linenum ++; } + if (!isnewline) { + fprintf(stderr, "%s: reading %s: missing newline at end of file\n", progname, FUSE_CONF); + + } fclose(fp); } else if (errno != ENOENT) { fprintf(stderr, "%s: failed to open %s: %s\n",