* UnixMarshal.cs: Errno.EBADF should also trigger a ArgumentException.
[mono.git] / mcs / class / Mono.Posix / Mono.Unix / UnixPath.cs
index ebaadd0a7c67bf1a46e20ca16b69e6fc9b1adf14..815924449309b5bfc2c5d6ae5b4136837866dfd7 100644 (file)
@@ -111,7 +111,7 @@ namespace Mono.Unix {
                        if (path == null)
                                throw new ArgumentNullException ("path");
                        if (!IsPathRooted (path))
-                               path = UnixDirectory.GetCurrentDirectory() + DirectorySeparatorChar + path;
+                               path = UnixDirectoryInfo.GetCurrentDirectory() + DirectorySeparatorChar + path;
 
                        return path;
                }
@@ -198,11 +198,11 @@ namespace Mono.Unix {
                {
                        StringBuilder buf = new StringBuilder (256);
                        do {
-                               int r = Syscall.readlink (path, buf);
+                               int r = Native.Syscall.readlink (path, buf);
                                if (r < 0) {
-                                       Error e;
-                                       switch (e = Syscall.GetLastError()) {
-                                       case Error.EINVAL:
+                                       Native.Errno e;
+                                       switch (e = Native.Stdlib.GetLastError()) {
+                                       case Native.Errno.EINVAL:
                                                // path isn't a symbolic link
                                                return null;
                                        default: