[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] RE: [PATCH] Fail XS_DIRECTORY for paths with no children
> -----Original Message----- > From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of > Marek Marczykowski-Górecki > Sent: 10 January 2021 12:35 > To: Owen Smith <owen.smith@xxxxxxxxxx> > Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx > Subject: Re: [PATCH] Fail XS_DIRECTORY for paths with no children > > On Wed, Jan 06, 2021 at 04:17:50PM +0000, Owen Smith wrote: > > When a xenstore path has no children, a response is generated which > > contians only the double null terminator. Detect a 0-length response > > payload and return STATUS_OBJECT_PATH_NOT_FOUND to indicate that this > > path does not have any children > > Is it really the right thing to do? I think it may confuse empty > directory with non-existing directory. But I may be missing some context > here. For Directory I think ENOENT (aka STATUS_OBJECT_PATH_NOT_FOUND) is the most useful thing to hand back in both the empty and non-existent cases. If it becomes necessary to distinguish between the two then a Read can be issued which would succeed in the former case but fail in the latter. Paul > > -- > Best Regards, > Marek Marczykowski-Górecki > Invisible Things Lab > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing?
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |