|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 05/20] libxl: provide libxl__remove_file et al.
Ian Campbell writes ("Re: [Xen-devel] [PATCH 05/20] libxl: provide
libxl__remove_file et al."):
> > + size_t need = offsetof(struct dirent, d_name) +
> > + pathconf(dirpath, _PC_NAME_MAX) + 1;
>
> This was an interesting pattern, but I see that readdir(3) recommends
> portable programs do things this way...
Bizarre, eh ?
> > + const char *subpath = GCSPRINTF("%s/%s", dirpath, de->d_name);
> > + if (libxl__remove_file_or_directory(gc, subpath))
> > + rc = ERROR_FAIL;
>
> Deliberately doesn't "goto out" so as to remove as much as possible?
Yes.
> If so then:
>
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |