mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
osx: update afssettings for yosemite
handle deprecated functions Change-Id: I437ec88b7909c38af247f44d58599da8810a72f2 Reviewed-on: http://gerrit.openafs.org/11836 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
fda2bc8747
commit
ab9bb6363c
@ -159,6 +159,10 @@ Setting sysctl_darwin[] = {
|
|||||||
{@"Darwin80", AFS_SC_DARWIN_80, Node, NULL},
|
{@"Darwin80", AFS_SC_DARWIN_80, Node, NULL},
|
||||||
{@"Darwin90", AFS_SC_DARWIN_90, Node, NULL},
|
{@"Darwin90", AFS_SC_DARWIN_90, Node, NULL},
|
||||||
{@"Darwin100", AFS_SC_DARWIN_100, Node, NULL},
|
{@"Darwin100", AFS_SC_DARWIN_100, Node, NULL},
|
||||||
|
{@"Darwin110", AFS_SC_DARWIN_110, Node, NULL},
|
||||||
|
{@"Darwin120", AFS_SC_DARWIN_120, Node, NULL},
|
||||||
|
{@"Darwin130", AFS_SC_DARWIN_130, Node, NULL},
|
||||||
|
{@"Darwin140", AFS_SC_DARWIN_140, Node, NULL},
|
||||||
{NULL, 0, 0, NULL}
|
{NULL, 0, 0, NULL}
|
||||||
};
|
};
|
||||||
Setting sysctl_first[] = {
|
Setting sysctl_first[] = {
|
||||||
@ -174,7 +178,6 @@ main(int argc, char **argv)
|
|||||||
struct vfsconf vfcp;
|
struct vfsconf vfcp;
|
||||||
NSData *plistData;
|
NSData *plistData;
|
||||||
id plist;
|
id plist;
|
||||||
NSString *error;
|
|
||||||
NSAutoreleasePool * nspool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool * nspool = [[NSAutoreleasePool alloc] init];
|
||||||
NSString *plistpath = @"/var/db/openafs/etc/config/settings.plist";
|
NSString *plistpath = @"/var/db/openafs/etc/config/settings.plist";
|
||||||
int oid[CTL_MAXNAME] = {CTL_VFS};
|
int oid[CTL_MAXNAME] = {CTL_VFS};
|
||||||
@ -183,13 +186,13 @@ main(int argc, char **argv)
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
plistData = [NSData dataWithContentsOfFile: plistpath];
|
plistData = [NSData dataWithContentsOfFile: plistpath];
|
||||||
if(plistData) {
|
if(plistData) {
|
||||||
plist = [NSPropertyListSerialization propertyListFromData: plistData
|
plist = [NSPropertyListSerialization propertyListWithData: plistData
|
||||||
mutabilityOption: NSPropertyListImmutable
|
options: NSPropertyListImmutable
|
||||||
format: NULL
|
format: NULL
|
||||||
errorDescription: &error
|
error: NULL
|
||||||
];
|
];
|
||||||
if (!plist) {
|
if (!plist) {
|
||||||
NSLog(@"Error reading plist from file '%s', error = '%s'", [plistpath UTF8String], [error UTF8String]);
|
NSLog(@"Error reading plist from file '%s'", [plistpath UTF8String]);
|
||||||
[nspool release];
|
[nspool release];
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user