mirror of
https://github.com/darlinghq/xcbuild.git
synced 2025-02-23 18:00:54 +00:00
made lsbom default usage print correct info
default usage prints mode(oct) and UID/GID now
This commit is contained in:
parent
9ccf7c40ae
commit
2a401e275c
@ -13,6 +13,8 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@ -429,7 +431,12 @@ main(int argc, char **argv)
|
||||
printf("%s\n", path.c_str());
|
||||
} else {
|
||||
// TODO: Respect options about what to print.
|
||||
printf("%s\n", path.c_str());
|
||||
std::stringstream octConvertingStream;
|
||||
octConvertingStream << std::oct << ntohs(path_info_2_value->mode);
|
||||
std::string mode = octConvertingStream.str();
|
||||
std::string UID = std::to_string(ntohl(path_info_2_value->user));
|
||||
std::string GID = std::to_string(ntohl(path_info_2_value->group));
|
||||
printf("%s\t%s\t%s/%s\n", path.c_str(), mode.c_str(), UID.c_str(), GID.c_str());
|
||||
}
|
||||
}, reinterpret_cast<void *>(&context));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user