Usermode - More hackery to get glib compiling
[tpg/acess2.git] / Usermode / Applications / mount_src / main.c
index 7c401bd..ced3944 100644 (file)
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
        // If no directory was passed (we want to use the mount list)
        // or we are not root (we need to use the mount list)
        // Check the mount list
-       if(sDir == NULL || getuid() != 0)
+       if(sDir == NULL || _SysGetUID() != 0)
        {
                // Check if it is defined in the mounts file
                // - At this point sDevice could be a device name or a mount point
@@ -142,20 +142,20 @@ int main(int argc, char *argv[])
        }
        
        // Check Device
-       fd = open(sDevice, OPENFLAG_READ);
+       fd = _SysOpen(sDevice, OPENFLAG_READ);
        if(fd == -1) {
                printf("Device '%s' cannot be opened for reading\n", sDevice);
                return EXIT_FAILURE;
        }
-       close(fd);
+       _SysClose(fd);
        
        // Check Mount Point
-       fd = open(sDir, OPENFLAG_EXEC);
+       fd = _SysOpen(sDir, OPENFLAG_EXEC);
        if(fd == -1) {
                printf("Directory '%s' does not exist\n", sDir);
                return EXIT_FAILURE;
        }
-       close(fd);
+       _SysClose(fd);
 
        // Replace sOptions with an empty string if it is still NULL
        if(sOptions == NULL)    sOptions = "";

UCC git Repository :: git.ucc.asn.au