2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
13 /* @(#)usalsettarget.c 1.2 04/01/14 Copyright 2000 J. Schilling */
16 * set target SCSI address
18 * This is the only place in libusal that is allowed to assign
19 * values to the usal address structure.
21 * Copyright (c) 2000 J. Schilling
24 * This program is free software; you can redistribute it and/or modify
25 * it under the terms of the GNU General Public License version 2
26 * as published by the Free Software Foundation.
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
33 * You should have received a copy of the GNU General Public License along with
34 * this program; see the file COPYING. If not, write to the Free Software
35 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
42 #include <usal/scsitransp.h>
44 int usal_settarget(SCSI *usalp, int, int, int);
47 usal_settarget(SCSI *usalp, int busno, int tgt, int tlun)
51 if (usalp->ops != NULL)
52 fd = SCGO_FILENO(usalp, busno, tgt, tlun);
54 usal_scsibus(usalp) = busno;
55 usal_target(usalp) = tgt;
56 usal_lun(usalp) = tlun;