* [9fans] u9fs question
@ 2003-02-28 0:20 Ronald G. Minnich
2003-02-28 0:26 ` Russ Cox
0 siblings, 1 reply; 2+ messages in thread
From: Ronald G. Minnich @ 2003-02-28 0:20 UTC (permalink / raw)
To: 9fans
I'm getting the "whoops: can't happen in u9fs" but can't see why.
(gdb) where
#0 rwstat (rx=0xbffff780, tx=0xbffff5c0) at u9fs.c:908
This is the code
if(d.name[0]){
903 old = fid->path;
904 dir = estrdup(fid->path);
(gdb)
905 if((p = strrchr(dir, '/')) > dir)
906 *p = '\0';
907 else{
908 seterror(tx, "whoops: can't happen in
u9fs");
909 return;
910 }
(gdb) print d.name
$5 = 0x80c2775 "h4"
(gdb) print old
$6 = 0x80cc530 "/h4"
(gdb) print dir
$7 = 0x80cbee0 "/h4"
(gdb)
(gdb) print *fid
$9 = {fid = 2, path = 0x80cc530 "/h4", st = {st_dev = 769, __pad1 = 0,
st_ino = 2110, st_mode = 33188, st_nlink = 1, st_uid = 0, st_gid = 0,
st_rdev = 0, __pad2 = 0, st_size = 0, st_blksize = 4096, st_blocks =
0,
st_atime = 1046423312, __unused1 = 0, st_mtime = 1046423312,
__unused2 = 0, st_ctime = 1046423312, __unused3 = 0, __unused4 = 0,
__unused5 = 0}, u = 0x80cbe38, omode = 2, dir = 0x0, diroffset = 0,
fd = 8, dirent = 0x0, next = 0x80cbda0, prev = 0x0}
so d.name is fine, the fid->path is ok I guess (should it be / or /h4? --
I'm thinking /, but how did it get to /h4).
any other ideas what to look for?
This is testing from the new Linux VFS. A great deal of things are
working. This fid came from a create.
ron
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] u9fs question
2003-02-28 0:20 [9fans] u9fs question Ronald G. Minnich
@ 2003-02-28 0:26 ` Russ Cox
0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2003-02-28 0:26 UTC (permalink / raw)
To: 9fans
I'm not sure why I thought that wouldn't happen.
It looks like the right code would be:
if((p = strrchr(dir, '/')) == nil){
seterror(tx, "whoops: can't happen in u9fs");
return;
}
*p = '\0';
Russ
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-02-28 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 0:20 [9fans] u9fs question Ronald G. Minnich
2003-02-28 0:26 ` Russ Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).