Permalink
Browse files

fixes and remove some annoying debug output

  • Loading branch information...
1 parent 76db7e6 commit 93777bcdb6813883976fd233abe167db7a94d271 @core-code committed May 30, 2012
Showing with 11 additions and 7 deletions.
  1. +7 −3 Mac/JMHostInformation.m
  2. +4 −4 Mac/JMLoginItemManager.m
@@ -444,14 +444,18 @@ + (NSMutableArray *)mountedHarddisks:(BOOL)includeRAIDBackingDevices
CFRelease(data);
}
- else
- asl_NSLog(ASL_LEVEL_ERR, @"Error: couldn't get serial number");
+// else
+// asl_NSLog(ASL_LEVEL_ERR, @"Error: couldn't get serial number");
}
}
if ([diskDict2 objectForKey:kDiskNumberKey])
{
- [diskDict2 setObject:$stringf(@"%@ (%@)", (NSString *)volNameAsCFString, [serial stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]) forKey:kDiskNameKey];
+ NSString *info = serial ? [serial stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] : @"NOSERIAL";
+
+ [diskDict2 setObject:$stringf(@"%@ (%@)", (NSString *)volNameAsCFString, info)
+ forKey:kDiskNameKey];
+
[nonRemovableVolumes addObject:diskDict2];
// NSLog(@"disk Dict %@", diskDict2);
}
@@ -68,19 +68,19 @@ BOOL IsLoginItem_LS(void)
if (status == noErr)
{
- asl_NSLog_debug(@"isLoginItem: current login item: %@", [url path]);
+ //asl_NSLog_debug(@"isLoginItem: current login item: %@", [url path]);
if (NSOrderedSame == [[url path] compare:bp]) // the path is the same as ours => return true
{
- asl_NSLog_debug(@"isLoginItem: FOUND US");
+ //asl_NSLog_debug(@"isLoginItem: FOUND US");
CFRelease(url);
CFRelease(array);
CFRelease(list);
return TRUE;
}
else if (NSOrderedSame == [[[url path] lastPathComponent] compare:[[[NSBundle mainBundle] bundlePath] lastPathComponent]]) // another entry of us, must be valid since on 10.5 invalid entries are erased automatically
{
- asl_NSLog_debug(@"isLoginItem: found similar");
+ //asl_NSLog_debug(@"isLoginItem: found similar");
}
}
@@ -121,7 +121,7 @@ void AddLoginItem_SM(void)
void AddLoginItem_LS(void)
{
- asl_NSLog_debug(@"addLoginItem: bundle path: %@", [[NSBundle mainBundle] bundlePath]);
+ //asl_NSLog_debug(@"addLoginItem: bundle path: %@", [[NSBundle mainBundle] bundlePath]);
LSSharedFileListRef list = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
if (list)

0 comments on commit 93777bc

Please sign in to comment.