X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=scandir.cc;h=dba840d87895c58ea29fa430aedce2a878d036f3;hb=0a07a7639c85709a565ff1567d90e00e240e9571;hp=4ffd0784e9042bc1a4dda46ce6a370b2502194f6;hpb=def20364a3596d7b1fa4a07f3d3ee056cfff2d1e;p=cumulus.git diff --git a/scandir.cc b/scandir.cc index 4ffd078..dba840d 100644 --- a/scandir.cc +++ b/scandir.cc @@ -280,7 +280,7 @@ void dump_inode(const string& path, // Path within snapshot printf("%s\n", path.c_str()); - file_info["mode"] = encode_int(stat_buf.st_mode & 07777); + file_info["mode"] = encode_int(stat_buf.st_mode & 07777, 8); file_info["mtime"] = encode_int(stat_buf.st_mtime); file_info["user"] = encode_int(stat_buf.st_uid); file_info["group"] = encode_int(stat_buf.st_gid); @@ -617,11 +617,6 @@ int main(int argc, char *argv[]) } } - if (argc < optind + 2) { - usage(argv[0]); - return 1; - } - searches.push_back("."); if (optind == argc) { add_include("."); @@ -723,7 +718,7 @@ int main(int argc, char *argv[]) desc_filename = desc_filename + desc_buf + ".lbs"; std::ofstream descriptor(desc_filename.c_str()); - descriptor << "Format: LBS Snapshot v0.1\n"; + descriptor << "Format: LBS Snapshot v0.2\n"; descriptor << "Producer: LBS " << lbs_version << "\n"; strftime(desc_buf, sizeof(desc_buf), "%Y-%m-%d %H:%M:%S %z", &time_buf); descriptor << "Date: " << desc_buf << "\n";