6382c52fba4c3329a43ddc283cdc14d4eaf5b431
[openafs.git] / src / WINNT / afsd / afsshare.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #include <afs/param.h>
11 #include <afs/stds.h>
12
13 #include <windows.h>
14 #include <stdio.h>
15
16 main(int argc, char **argv) {
17     BOOL res;
18     if (argc < 2 || argc > 3) {
19         fprintf(stderr, "Incorrect arguments\n");
20         exit(1);
21     }
22     res = WritePrivateProfileString("AFS Submounts",
23                                     argv[1],
24                                     (argc == 3) ? argv[2] : NULL,
25                                     "afsdsbmt.ini");
26     if (res == FALSE)
27         fprintf(stderr, "Failed, error code %d\n", GetLastError());
28
29     return 0;
30 }