+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2000 Silicon Graphics, Inc.
* All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
*
* This function will allow someone to set the debug level.
***********************************************************************/
int
-lio_set_debug(level)
+lio_set_debug(int level)
{
int old;
long wrd; /* to allow future features, use zero for now */
{
int ret = 0; /* syscall return or used to get random method */
- char *io_type; /* Holds string of type of io */
#ifndef linux
int omethod = method;
int listio_cmd; /* Holds the listio/lio_listio cmd */
/*
* Determine the system call that will be called and produce
* the string of the system call and place it in Lio_SysCall.
- * Also update the io_type char pointer to give brief description
- * of system call. Execute the system call and check for
- * system call failure. If sync i/o, return the number of
- * bytes written/read.
+ * Execute the system call and check for system call failure.
+ * If sync i/o, return the number of bytes written/read.
*/
if ( (method & LIO_IO_SYNC) || (method & LIO_IO_TYPES) == 0 ){
sprintf(Lio_SysCall,
"write(%d, buf, %d)", fd, size);
- io_type="write";
if ( Debug_level ) {
printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
}
else if ( method & LIO_IO_SYNCV ) {
- io_type="writev(2)";
sprintf(Lio_SysCall,
"writev(%d, &iov, 1) nbyte:%d", fd, size);
long wrd; /* to allow future features, use zero for now */
{
int ret = 0; /* syscall return or used to get random method */
- char *io_type; /* Holds string of type of io */
#ifndef linux
int listio_cmd; /* Holds the listio/lio_listio cmd */
int omethod = method;
/*
* Determine the system call that will be called and produce
* the string of the system call and place it in Lio_SysCall.
- * Also update the io_type char pointer to give brief description
- * of system call. Execute the system call and check for
- * system call failure. If sync i/o, return the number of
- * bytes written/read.
+ * Execute the system call and check for system call failure.
+ * If sync i/o, return the number of bytes written/read.
*/
if ( (method & LIO_IO_SYNC) || (method & LIO_IO_TYPES) == 0 ){
sprintf(Lio_SysCall,
"read(%d, buf, %d)", fd, size);
- io_type="read";
if ( Debug_level ) {
printf("DEBUG %s/%d: %s\n", __FILE__, __LINE__, Lio_SysCall);
}
else if ( method & LIO_IO_SYNCV ) {
- io_type="readv(2)";
sprintf(Lio_SysCall,
"readv(%d, &iov, 1) nbyte:%d", fd, size);