scsi_setup_cdb(9F) Kernel Functions for Drivers scsi_setup_cdb(9F)NAME
scsi_setup_cdb - setup SCSI command descriptor block (CDB)
SYNOPSIS
int scsi_setup_cdb(union scsi_cdb *cdbp, uchar_t cmd, uint_t addr, uint_t cnt, uint_t othr_cdb_data);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
cdbp Pointer to command descriptor block.
cmd The first byte of the SCSI group 0, 1, 2, 4, or 5 CDB.
addr Pointer to the location of the data.
cnt Data transfer length in units defined by the SCSI device type. For sequential devices cnt is the number of bytes. For
block devices, cnt is the number of blocks.
othr_cdb_data Additional CDB data.
DESCRIPTION
scsi_setup_cdb() function initializes a group 0, 1, 2, 4, or 5 type of command descriptor block pointed to by cdbp using cmd, addr, cnt,
othr_cdb_data.
addr should be set to 0 for commands having no addressing information (for example, group 0 READ command for sequential access devices).
othr_cdb_data should be additional CDB data for Group 4 commands; otherwise, it should be set to 0.
scsi_setup_cdb() function does not set the LUN bits in CDB[1] as the makecom(9F) functions do. Also, the fixed bit for sequential access
device commands is not set.
RETURN VALUES
scsi_setup_cdb() returns:
1 Upon success.
0 Upon failure.
CONTEXT
These functions can be called from a user or interrupt context.
SEE ALSO makecom(9F), scsi_pkt(9S)
Writing Device Drivers
American National Standard Small Computer System Interface-2 (SCSI-2)
American National Standard SCSI-3 Primary Commands (SPC)
SunOS 5.10 23 Jun 1997 scsi_setup_cdb(9F)
Check Out this Related Man Page
scsi_setup_cdb(9F) Kernel Functions for Drivers scsi_setup_cdb(9F)NAME
scsi_setup_cdb - setup SCSI command descriptor block (CDB)
SYNOPSIS
int scsi_setup_cdb(union scsi_cdb *cdbp, uchar_t cmd, uint_t addr, uint_t cnt, uint_t othr_cdb_data);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
cdbp Pointer to command descriptor block.
cmd The first byte of the SCSI group 0, 1, 2, 4, or 5 CDB.
addr Pointer to the location of the data.
cnt Data transfer length in units defined by the SCSI device type. For sequential devices cnt is the number of bytes. For
block devices, cnt is the number of blocks.
othr_cdb_data Additional CDB data.
DESCRIPTION
scsi_setup_cdb() function initializes a group 0, 1, 2, 4, or 5 type of command descriptor block pointed to by cdbp using cmd, addr, cnt,
othr_cdb_data.
addr should be set to 0 for commands having no addressing information (for example, group 0 READ command for sequential access devices).
othr_cdb_data should be additional CDB data for Group 4 commands; otherwise, it should be set to 0.
scsi_setup_cdb() function does not set the LUN bits in CDB[1] as the makecom(9F) functions do. Also, the fixed bit for sequential access
device commands is not set.
RETURN VALUES
scsi_setup_cdb() returns:
1 Upon success.
0 Upon failure.
CONTEXT
These functions can be called from a user or interrupt context.
SEE ALSO makecom(9F), scsi_pkt(9S)
Writing Device Drivers
American National Standard Small Computer System Interface-2 (SCSI-2)
American National Standard SCSI-3 Primary Commands (SPC)
SunOS 5.10 23 Jun 1997 scsi_setup_cdb(9F)
We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Hello guys
I want to retrieve two data from a file, like this:
bash-2.03$ cat numtest
123456
123457
bash-2.03$ more ./test_num
#!/bin/bash
num1=
num2=
cnt=1
while read x
do
num${cnt}=$x
cnt=$(($cnt+1))
done <$1
echo $num1 "\n" $num2
But when i executed this script, error... (2 Replies)
So, I've got a ton of files that I want to go through (ie something like 300,000), and they're all labeled sequentially. However I'm not 100% positive that they are all there.
Is there any way of running through a sequence of numbers, checking if the file is in the folder, if not appending it... (2 Replies)
I want to check the length of a parameter passed to the korn shell. I've tested:
xxx=hello
echo $xxx
cnt=`echo $xxx |wc -c`
echo "cnt $cnt"
(xxx will be the parm). $cnt is 6, it should be 5. I keep getting 1 more then I should. Why is that? How do I code to get the length of a parameter? (4 Replies)
Hi,
I have a .ksh script, and I read files from a directory with "set" command:
set B*.txt
Means I can now assign with
file1=$1
the first filename found to a variable file1.
How can I count how many files it has found with "set"?
Thanks,
Michael (7 Replies)
Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX
I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Hi,
Can someone advise/help me on how to write a script to extract sequential lines. I was able to find and get a script working to create permutations of the inputs, but that not what I want/need.
awk 'function perm(p,s, i) {
for(i=1;i<=n;i++)
if(p==1)
... (4 Replies)