]> git.lizzy.rs Git - rust.git/blobdiff - src/shims/foreign_items.rs
Add getcwd shim
[rust.git] / src / shims / foreign_items.rs
index 90c18265fcf7c9cc93527692b3159656ddb5810d..45f167bea582dde2804401b1ea5db190eb7ea58e 100644 (file)
@@ -436,6 +436,11 @@ fn emulate_foreign_item(
                 this.write_scalar(Scalar::from_int(result, dest.layout.size), dest)?;
             }
 
+            "getcwd" => {
+                let result = this.getcwd(args[0], args[1])?;
+                this.write_scalar(result, dest)?;
+            }
+
             "write" => {
                 let fd = this.read_scalar(args[0])?.to_i32()?;
                 let buf = this.read_scalar(args[1])?.not_undef()?;