setlocale(LC_ALL, "en_AU.UTF-8");
if (argc == 1) {
- printf("usage: %s [-d database] options\n"
+ printf("usage: %s [-b database] options\n"
" [ -f fileid ]\n"
" [ -s seq ]\n"
" [ -d diskid ] selectors\n"
return 0;
}
- if (argc > 2 && strcmp(argv[1], "-d") == 0) {
+ if (argc > 2 && strcmp(argv[1], "-b") == 0) {
dbdir = argv[2];
argv += 2;
argc -= 2;
dbscan scan;
for (dbfile *file = dbscan_file(tx, &scan, db, fileid); file; file = dbscan_file_next(&scan)) {
+ if (diskid && file->diskid != diskid)
+ continue;
printf("%4d %-60s '%s'\n", file->id, file->title, file->path);
dbfile_free(file);
}