Date: Sat, 24 Sep 2005 20:26:33 -0700 From: Frank Mayhar <frank@exit.com> To: FreeBSD-hackers@freebsd.org Subject: Oddity in libufs. Message-ID: <1127618793.38683.9.camel@realtime.exit.com>
next in thread | raw e-mail | index | archive | help
I've been using libufs as the I/O mechanism for my (heavy) modification of sysutils/ffsrecov. It's working to my needs and now I'm poking at other bits and pieces to maybe get it suitable for release into the wild. I just looked at cgread() to see what it does and noticed that there seems to be a redundant line: . . if (c >= fs->fs_ncg) { return (0); } ccg = fsbtodb(fs, cgtod(fs, c)) * disk->d_bsize; if (bread(disk, fsbtodb(fs, cgtod(fs, c)), disk->d_cgunion.d_buf, . . That assignment up there looks redundant, as ccg is never used. I suspect that it's a relic of an old lseek()/read() pair that's long gone. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1127618793.38683.9.camel>