Skip to contentSkip to conversation

Reporting wrong status for non-existant files

PATCH Superseded Glauber de Oliveira Costa 3 participants 3 messages Oct 23, 2006 – Oct 25, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reporting wrong status for non-existant files

Hi,

The block scripts under tools/examples is not reporting the proper information in the event of a non-exitent file being passed on, like in "file:/nonexistant,hda,w".

Thanks,

Signature · 3 lines
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"

# HG changeset patch
# User [email protected]
# Date 1161631865 14400
# Node ID 6b28d144c5814b5206592e93bcea4b7d0a752e8a
# Parent 29b02d929b7e4df6016c16ebba71d6d73462882e
The block script is reporting the file as non-writable, even if it does not exists

tools/examples/block +9 -1
diff -r 29b02d929b7e -r 6b28d144c581 tools/examples/block
@@ -266,7 +266,15 @@ case "$command" in
 
         claim_lock "block"
 
-        if [ "$mode" == 'w' ] && ! stat "$file" -c %A | grep -q w
+        fstat=$(stat "$file" -c %A)
+        if [ "$?" == '1' ];
+        then
+          release_lock "block"
+          ebusy \
+"File $file not found."
+        fi
+
+        if [ "$mode" == 'w' ] && ! echo $fstat | grep -q w
         then
           release_lock "block"
           ebusy \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 21 lines · Glauber de Oliveira Costa

Hi,

The block scripts under tools/examples is not reporting the proper information in the event of a non-exitent file being passed on, like in "file:/nonexistant,hda,w".

Thanks,

Signature · 11 lines
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"

# HG changeset patch
# User [email protected]
# Date 1161631865 14400
# Node ID 6b28d144c5814b5206592e93bcea4b7d0a752e8a
# Parent  29b02d929b7e4df6016c16ebba71d6d73462882e
The block script is reporting the file as non-writable, even if it does
not exists

I'd love to take this patch, but I can't without a Signed-off-by: line from you. This is true of all the patches you've recently sent. Could you send this one again, but with a Signed-off-by line in place, please?

Thanks,

Ewan.

#2 lore raw
Quoted 4 lines

I'd love to take this patch, but I can't without a Signed-off-by: line from you. This is true of all the patches you've recently sent. Could you send this one again, but with a Signed-off-by line in place, please?

Very sorry! ;-)

Should I send them all again with it?

Signature · 5 lines
Glauber de Oliveira Costa.
"Free as in Freedom"

Add your comments to GPLv3 at:
http://gplv3.fsf.org/comments/gplv3-draft-2.html