📄 sca_list_idx.c
字号:
/* * Copyright (c) 1997-2003 Erez Zadok * Copyright (c) 2001-2003 Stony Brook University * Copyright (c) 1997-2000 Columbia University * * For specific licensing information, see the COPYING file distributed with * this package, or get one from ftp://ftp.filesystems.org/pub/fist/COPYING. * * This Copyright notice must be kept intact and distributed with all * fistgen sources INCLUDING sources generated by fistgen. *//* * $Id: sca_list_idx.c,v 1.4 2002/12/27 20:19:02 ezk Exp $ */#include <stdio.h>#include <sys/stat.h>#include <fcntl.h>#include "sca_aux.h"voidusage(const char *progname){ fprintf(stderr, "Usage: %s [idx file]\n", progname);}intmain(int argc, char **argv){ int cnt, i, prev=0; unsigned int flags; struct fistfs_header hdr; if (argc != 2) { usage(argv[0]); exit(1); } if((cnt = read_idx(argv[1], &hdr)) < 0) { fprintf(stderr, "sca_read_idx returns %d\n", cnt); } printf("Flag bits = 0x%x\n", hdr.flags); printf("Real file length %d, using %d chunks\n", hdr.real_size, hdr.num_pages); for(i=0; i<cnt; i++) { printf("%3d - %6ld [%ld]\n", i, hdr.offsets[i], hdr.offsets[i] - prev); prev = hdr.offsets[i]; } exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -