FreeBSD/sys/cam/scsi/scsi_ch.c
/*
 * Copy a volume tag to a volume_tag struct, converting SCSI byte order
 * to host native byte order in the volume serial number.  The volume
 * label as returned by the changer is transferred to user mode as
 * nul-terminated string.  Volume labels are truncated at the first
 * space, as suggested by SCSI-2.
 */
Copy a volume tag to a volume_tag struct, converting SCSI byte order
to host native byte order in the volume serial number.  The volume
label as returned by the changer is transferred to user mode as
nul-terminated string.  Volume labels are truncated at the first
space, as suggested by SCSI-2.
Copy a volume tag to a volume_tag struct converting SCSI byte order to host native byte order in the volume serial number . The volume label as returned by the changer is transferred to user mode as nul - terminated string . Volume labels are truncated at the first space as suggested by SCSI - 2 .
static	void
copy_voltag(struct changer_voltag *uvoltag, struct volume_tag *voltag)
{
	int i;
	for (i=0; i<CH_VOLTAG_MAXLEN; i++) {
		char c = voltag->vif[i];
		if (c && c != ' ')
			uvoltag->cv_volid[i] = c;
	        else
			break;
	}
	uvoltag->cv_serial = scsi_2btoul(voltag->vsn);
}
static void copy_voltag ( struct changer_voltag * uvoltag , struct volume_tag * voltag ) { int i ; for ( i = 0 ; i < CH_VOLTAG_MAXLEN ; i ++ ) { char c = voltag -> vif [ i ] ; if ( c && c != ' ' ) uvoltag -> cv_volid [ i ] = c ; else break ; } uvoltag -> cv_serial = scsi_2btoul ( voltag -> vsn ) ; }
Copy a volume tag to a volume_tag struct, converting SCSI byte order
 to host native byte order in the volume serial number.
Copy a volume tag to a volume_tag struct converting SCSI byte order to host native byte order in the volume serial number .