bool Unify_copy(char const *src, struct stat const *src_stat, char const *dst) { // skip sockets // TODO: message if (S_ISSOCK(src_stat->st_mode)) return true; return (((S_ISLNK (src_stat->st_mode) && copyLnk (src, dst)) || (S_ISREG (src_stat->st_mode) && copyReg (src, src_stat, dst)) || (S_ISDIR (src_stat->st_mode) && copyDir (src, src_stat, dst)) || ((S_ISBLK (src_stat->st_mode) || S_ISCHR (src_stat->st_mode) || S_ISFIFO(src_stat->st_mode)) && copyNode(src, src_stat, dst)) ) && setModes(dst, src_stat) && Unify_setTime(dst, src_stat)); }
int main() { gfxInitDefault(); consoleInit(GFX_BOTTOM, NULL); printf("Update Suppressor %s\n", VERSION); setModes(); if (debug) printf("Debug Mode\n"); switch (mode) { case MODE_SINGLE: puts("Single Mode"); break; case MODE_ALL: puts("All Mode"); break; case MODE_FILE: puts("Not Implemented: File Mode"); break; default: puts("wtf? Unknown Mode"); break; } u64 PID = 0; if (mode == MODE_SINGLE) { aptOpenSession(); APT_GetProgramID(&PID); aptCloseSession(); printf("Title Id: %08X%08X\n", (unsigned int) (PID >> 32), (unsigned int) (PID & 0xFFFFFFFF)); }