From b78d0b46fccf7b172b3171f2315537b685b127e7 Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Sun, 11 Apr 2021 19:49:17 -0400 Subject: [PATCH] macos: Remove dead prefpane source file afsltd.m Commit b0818fcdb227c8b291eb7b23e504fd1d2240eea6 'Cleaned most warning OSX OpenAFS preference and completed the AFSBackgrounder implementation' removed mention of afsltd.m from the xcode project, but neglected to remove the actual source code file afsltd.m. Remove the dead code. No functional change is incurred by this commit. Change-Id: I85f9a0842187c39a40cb8492e60a9371d6ff041d Reviewed-on: https://gerrit.openafs.org/14591 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie --- src/platform/DARWIN/AFSPreference/afsltd.m | 85 ---------------------- 1 file changed, 85 deletions(-) delete mode 100644 src/platform/DARWIN/AFSPreference/afsltd.m diff --git a/src/platform/DARWIN/AFSPreference/afsltd.m b/src/platform/DARWIN/AFSPreference/afsltd.m deleted file mode 100644 index c2485e925e..0000000000 --- a/src/platform/DARWIN/AFSPreference/afsltd.m +++ /dev/null @@ -1,85 +0,0 @@ -// -// afsltd.m -// OpenAFS -// -// Created by Claudio Bisegni LNF-INFN on 26/04/08. -// Copyright 2008 Infn. All rights reserved. -// -#import "global.h" -#import "AFSPropertyManager.h" -#include - -BOOL useAklog = NO; -NSString *afsSysPath = nil; -AFSPropertyManager *propManager = nil; - -void readPreferenceFile(); -void makeAFSPropertyManager(); -void callAKlog(); - -int main(int argc, char *argv[]) -{ - - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - NSLog(@"Start AFS Preference Daemon"); - // read the preference file - readPreferenceFile(); - - //check if base afs path is set - if(!afsSysPath) return 1; - - //Sleep ten seconds - sleep(10); - - //make the afs property manager and load all afs configuration - makeAFSPropertyManager(); - - //call aklog - callAKlog(); - if(propManager) [propManager release]; - - [pool release]; - return 0; -} - -// ------------------------------------------------------------------------------- -// readPreferenceFile: -// ------------------------------------------------------------------------------- -void readPreferenceFile() -{ - // read the preference for afs path - afsSysPath = (NSString*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_AFS_SYS_PAT, (CFStringRef)kAfsCommanderID); - - - // read the preference for aklog use - NSNumber *useAklogPrefValue = (NSNumber*)CFPreferencesCopyAppValue((CFStringRef)PREFERENCE_USE_AKLOG, (CFStringRef)kAfsCommanderID); - useAklog = [useAklogPrefValue boolValue]; - -} - -// ------------------------------------------------------------------------------- -// makeAFSPropertyManager: -// ------------------------------------------------------------------------------- -void makeAFSPropertyManager() { - if(propManager) { - [propManager release]; - } - propManager = [[AFSPropertyManager alloc] initWithAfsPath:afsSysPath]; - [propManager loadConfiguration]; -} - -// ------------------------------------------------------------------------------- -// makeAFSPropertyManager: -// ------------------------------------------------------------------------------- -void callAKlog() { - //call aklog for all selected cell, but first check if afs is up - if([propManager checkAfsStatus] && useAklog) { - [propManager getTokens:false - usr:nil - pwd:nil]; - - // send notification to - [[NSDistributedNotificationCenter defaultCenter] postNotificationName:kAFSMenuExtraID object:kMExtraAFSStateChange]; - } -} \ No newline at end of file