FreeBSD/usr.sbin/dumpcis/readcis.c
/*
 *	return true if the offset points to a LINKTARGET tuple.
 */
return true if the offset points to a LINKTARGET tuple.
return true if the offset points to a LINKTARGET tuple .
static int
ck_linktarget(int fd, off_t offs, int flag)
{
	char    blk[5];
	ioctl(fd, PIOCRWFLAG, &flag);
	lseek(fd, offs, SEEK_SET);
	if (read(fd, blk, 5) != 5)
		return (0);
	if (blk[0] == CIS_LINKTARGET &&
	    blk[1] == 0x3 &&
	    blk[2] == 'C' &&
	    blk[3] == 'I' &&
	    blk[4] == 'S')
		return (1);
	return (0);
}
static int ck_linktarget ( int fd , off_t offs , int flag ) { char blk [ 5 ] ; ioctl ( fd , PIOCRWFLAG , & flag ) ; lseek ( fd , offs , SEEK_SET ) ; if ( read ( fd , blk , 5 ) != 5 ) return ( 0 ) ; if ( blk [ 0 ] == CIS_LINKTARGET && blk [ 1 ] == 0x3 && blk [ 2 ] == ' ' && blk [ 3 ] == ' ' && blk [ 4 ] == ' ' ) return ( 1 ) ; return ( 0 ) ; }
return true if the offset points to a LINKTARGET tuple.
return true if the offset points to a LINKTARGET tuple .