看板 DFBSD_bugs 關於我們 聯絡資訊
Sorry, dunno why but I still keep clicking on "Reply" instead of "Reply all" :-( 2009/12/14 Steve O'Hara-Smith <steve@sohara.org>: > =A0 =A0 =A0 =A0Hi Matt, > > =A0 =A0 =A0 =A0That's exactly what Antonio suggested (off list), I've jus= t tried it > and it works a treat. > > On Mon, 14 Dec 2009 08:07:01 -0800 (PST) > Matthew Dillon <dillon@apollo.backplane.com> wrote: > >> >> : =A0 =A0 So in short I'm pretty sure mountedon should not be being free= d, >> :commenting out the free on line 185 does make hammer info work for me. >> : >> :-- >> :Steve O'Hara-Smith =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|= =A0 Directable Mirror Arrays >> >> =A0 =A0 Nice catch. =A0It looks like the best solution is to strdup() th= e >> =A0 =A0 passed path on line 167. =A0Could you keep the free() and try th= at >> =A0 =A0 instead? >> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 -Matt >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 Matthew Dillon >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 <dillon@backplane.com> >> >> diff --git a/sbin/hammer/cmd_info.c b/sbin/hammer/cmd_info.c >> index bc93cb4..d4f14c6 100644 >> --- a/sbin/hammer/cmd_info.c >> +++ b/sbin/hammer/cmd_info.c >> @@ -164,7 +164,7 @@ show_info(char *path) >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (ioctl(fd, HAMMERIOC_GET_PSEUDOFS, &pfs) = >=3D 0) { >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ismaster =3D (pfs_od.mirror_= flags & >> HAMMER_PFSD_SLAVE) ? 0 : 1; if (pfs_id =3D=3D 0) >> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mountedon =3D = path; >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mountedon =3D = strdup(path); >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 else >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 mountedon = =3D find_pfs_mount(pfs_id, >> info.vol_fsid, ismaster); > > > -- > Steve O'Hara-Smith =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| = =A0 Directable Mirror Arrays > C:>WIN =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0| A better way to focus the sun > The computer obeys and wins. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0lice= nces available see > You lose and Bill collects. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0http= ://www.sohara.org/ >