Make LSRegisterURL stub silent without STUB_VERBOSE

This commit is contained in:
Ariel Abreu 2021-08-01 10:01:08 -04:00
parent 1b1fde4a6e
commit 1025c8845c
No known key found for this signature in database
GPG Key ID: D67AE16CCEA85B70

View File

@ -25,9 +25,16 @@
static void get_main_executable_info(CFURLRef appURL, CFStringRef *exec, CFStringRef *bundleName);
static int verbose = 0;
__attribute__((constructor)) static void initme(void) {
verbose = getenv("STUB_VERBOSE") != NULL;
}
OSStatus LSRegisterURL(CFURLRef inURL, Boolean inUpdate)
{
printf("STUB: LSRegisterURL\n");
if (verbose)
printf("STUB: LSRegisterURL\n");
return 0;
}