Remove uses of errno_to_string()
[akaros.git] / kern / src / ns / sysfile.c
index 6bad857..33c8094 100644 (file)
@@ -605,7 +605,7 @@ long unionread(struct chan *c, void *va, long n)
                        /* normally we want to discard the error, but for our ghetto kdirent
                         * hack, we need to repeat unionread if we saw a ENODATA */
                        if (waserror()) {
-                               if (!strcmp(current_errstr(), errno_to_string(ENODATA))) {
+                               if (get_errno() == ENODATA) {
                                        runlock(&m->lock);
                                        qunlock(&c->umqlock);
                                        nexterror();