Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Floppy image overflow

rin@ wrote:

> On 2017/02/07 23:51, Christos Zoulas wrote:
> > I am not enamored  with more ifdef's but this seems ok to me.
> In the new version, I've removed most of ifdef's.
> Instead, I define flags like needswap or isappleufs as (0), and unused
> functions as /* nothing */.

>> +#define	ffs_cg_swap(a, b, c)	/* nothing */
>> +#define	ffs_csum_swap(a, b, c)	/* nothing */
>> +#define	ffs_sb_swap(a, b)	/* nothing */
>> +#define	swap_dinode1(a, b)	/* nothing */
>> +#define	swap_dinode2(a, b)	/* nothing */

I'm afraid these unused functions should be "do {} while (/*CONSTCOND*/0)"
rather than "empty" comments because they could be used in if clauses
without braces (which is allowed in our /usr/share/misc/style):
			if (is_ufs2)
				swap_dinode2(inodebuf, lastinum - inumber);
				swap_dinode1(inodebuf, lastinum - inumber);
			bwrite(fswritefd, (char *)inodebuf, dblk, size);

All other part looks fine.

> I've added src/distrib/x_{fsck_ffs,newfs} and brief instruction there.
> Note that the original Makefile in src/sbin/{fsck_ffs,newfs} has been
> split into Makefile and Makefile.common, not as in the
> case of x_ifconfig. This is because conflicts with
> I will also rename it for x_ifconfig, and do some clean
> up after committing the main patch.

Also fine for me.

Note there was some confusion "what's":

Izumi Tsutsui

Home | Main Index | Thread Index | Old Index