📄 createmany.c
字号:
/* BLURB gpl Coda File System Release 6 Copyright (c) 1987-2003 Carnegie Mellon University Additional copyrights listed belowThis code is distributed "AS IS" without warranty of any kind underthe terms of the GNU General Public Licence Version 2, as shown in thefile LICENSE. The technical and financial contributors to Coda arelisted in the file CREDITS. Additional copyrights none currently#*/#include <util.h>#include <../partition.h>#include <../vicetab.h>extern void printnames(struct DiskPartition *dp, int low, int step, int high);intmain(int argc, char **argv){ struct DiskPartition *dp; Inode testcreate; Device devno; int fd, count, i, rc; char *buff="This is a test string"; InitPartitions("vicetab"); if ( argc != 3 ) { printf("Usage %s dir count.\n", argv[0]); exit(1); } dp = VGetPartition(argv[1]); devno = dp->device; count = atoi(argv[2]); /* printnames(dp, 1, 1, count); */ for ( i=1 ; i <= count ; i++ ) { testcreate = icreate(devno, i, i+1, i+2, i+3, i+4); if ( testcreate == 0 ) exit(1); } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -