[Cluster-devel] [PATCH] gfs2_jadd: Fix error handlers
Carlos Maiolino
cmaiolino at redhat.com
Tue Oct 4 19:26:01 UTC 2011
> > @@ -212,10 +218,9 @@ create_new_inode(struct gfs2_sbd *sdp)
> > if (errno == EEXIST) {
> > error = unlink(name);
> > if (error)
> > - die( _("can't unlink %s: %s\n"),
> > - name, strerror(errno));
> > + perror("unlink");
> > } else
> > - die( _("can't create %s: %s\n"), name, strerror(errno));
> > + perror("create");
> > }
> In this case you should be passing the name that couldn't be created
> rather than the string "create" to perror. Otherwise the user won't know
> what the message refers to,
>
> Steve.
>
Gotcha, thanks Steve, I'll fix that on my next patch
--
--Carlos
More information about the Cluster-devel
mailing list