Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
3140863b
Commit
3140863b
authored
Feb 10, 2003
by
Christoph Hellwig
Committed by
Christoph Hellwig
Feb 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] remove cpqioctl.c
This is userland testing code that leaked into the kernel tree somehow.
parent
bd12d5db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
76 deletions
+0
-76
drivers/scsi/cpqioctl.c
drivers/scsi/cpqioctl.c
+0
-76
No files found.
drivers/scsi/cpqioctl.c
deleted
100644 → 0
View file @
bd12d5db
// Test program for CPQFCTS ioctl calls
// build with:
// gcc -o cpqioctl cpqioctl.c
// ld -o cpqioctl /lib/crt0.o cpqioctl.o -lc
#include <stdio.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
#include <linux/types.h>
#include "../../include/scsi/scsi.h"
#include "cpqfcTSioctl.h"
typedef
struct
scsi_fctargaddress
{
unsigned
long
host_port_id
;
unsigned
char
host_wwn
[
8
];
}
Scsi_FCTargAddress
;
int
main
(
int
argc
,
char
**
argv
)
{
int
fd
,
i
;
Scsi_FCTargAddress
targ
;
int
uselect
=
0
;
if
(
argc
<
2
)
{
printf
(
"usage: cpqioctl <Devfile>
\n
"
);
exit
(
1
);
}
if
(
(
fd
=
open
(
argv
[
1
],
O_RDONLY
))
==
-
1
)
{
perror
(
"open"
);
exit
(
1
);
}
if
(
ioctl
(
fd
,
SCSI_IOCTL_FC_TARGET_ADDRESS
,
&
targ
)
)
{
perror
(
"ioctl"
);
exit
(
1
);
}
printf
(
"portid: %08x. wwn: "
,
targ
.
host_port_id
);
for
(
i
=
0
;
i
<
8
;
i
++
)
printf
(
" %02x"
,
targ
.
host_wwn
[
i
]);
printf
(
"
\n
"
);
while
(
uselect
!=
27
)
// not ESC key
{
printf
(
"
\n
IOCTL
\n
"
);
printf
(
"1. Get PCI info
\n
"
);
printf
(
"2. Send Passthru
\n
"
);
printf
(
" ==> "
);
scanf
(
"%c"
,
&
uselect
);
switch
(
uselect
)
{
case
'1'
:
{
cciss_pci_info_struct
pciinfo
;
if
(
ioctl
(
fd
,
CCPQFCTS_GETPCIINFO
,
&
pciinfo
))
perror
(
"ioctl"
);
else
printf
(
"
\n
PCI bus %d, dev_fn %d, board_id %Xh
\n
"
,
pciinfo
.
bus
,
pciinfo
.
dev_fn
,
pciinfo
.
board_id
);
}
}
}
close
(
fd
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment