File setup open can fail in multiple functions, not just open()
authorJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 11:02:24 +0000 (12:02 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 11:02:24 +0000 (12:02 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c

index f8e4d77cff3a2e935b509057f509a9cc628d5daf..eedb3dc341706f1914da0e8ccbde44474edc764f 100644 (file)
@@ -320,7 +320,10 @@ open_again:
                        goto open_again;
                }
 
                        goto open_again;
                }
 
-               snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
+               if (from_hash)
+                       snprintf(buf, sizeof(buf) - 1, "dup(%s)", f->file_name);
+               else
+                       snprintf(buf, sizeof(buf) - 1, "open(%s)",f->file_name);
 
                td_verror(td, __e, buf);
        }
 
                td_verror(td, __e, buf);
        }