Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 01:37:34PM +0100, Jim Meyering wrote: > Daniel P. Berrange wrote: > > On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: > >> When virStorageBackendProbeTarget fails, it returns -1 or -2. > >> The two uses below obviously intended to handle those cases > >> differ

Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Jim Meyering
Daniel P. Berrange wrote: > On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: >> When virStorageBackendProbeTarget fails, it returns -1 or -2. >> The two uses below obviously intended to handle those cases >> differently, but due to a wrong comparison, they always treated a >> "real" (e

Re: [libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Daniel P. Berrange
On Mon, Jan 18, 2010 at 10:40:26AM +0100, Jim Meyering wrote: > When virStorageBackendProbeTarget fails, it returns -1 or -2. > The two uses below obviously intended to handle those cases > differently, but due to a wrong comparison, they always treated a > "real" (e.g., open) failure (-1) just lik

[libvirt] [PATCH] storage_backend_fs.c: do not ignore probe failure

2010-01-18 Thread Jim Meyering
When virStorageBackendProbeTarget fails, it returns -1 or -2. The two uses below obviously intended to handle those cases differently, but due to a wrong comparison, they always treated a "real" (e.g., open) failure (-1) just like an ignorable "wrong file type" failure (-2). FYI, coverity reported