📄 scsi_type.c
字号:
#ifndef lintstatic char sccsid[] = "@(#)scsi_type.c 1.1 92/07/30 SMI";#endif lint/* * Copyright (c) 1988 by Sun Microsystems, Inc. */#include <stdio.h>#include "install.h"extern char *sprintf();intscsi_tapetype(tape_device) register char *tape_device;{ register int bs, fd; struct mtget tape; char device[24]; (void) sprintf(device,"/dev/nr%s",tape_device); if ((fd = open(device,O_RDONLY)) == -1) return (BS_DEFAULT); /* ask the tape device what type they are; * set the block size accordingly * else use default block size */ if (ioctl(fd, MTIOCGET, &tape) == 0) { bs = tape.mt_bf; } else bs = BS_DEFAULT; (void) close(fd); return (bs);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -