]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-file.c
Added very simple functions for emulating a fastbuf stream over a static
[libucw.git] / lib / fb-file.c
index 7d9de003abf6a7fb9f3cfc95b2253af71b308b67..cfc586bb3a69918ed27c1004b1fa717593709e17 100644 (file)
@@ -120,7 +120,11 @@ struct fastbuf *
 bopen(byte *name, uns mode, uns buffer)
 {
   struct fastbuf *b;
-  int fd = sh_open(name, mode, 0666);
+  int fd;
+
+  if (!buffer)
+    return bopen_mm(name, mode);
+  fd = sh_open(name, mode, 0666);
   if (fd < 0)
     die("Unable to %s file %s: %m",
        (mode & O_CREAT) ? "create" : "open", name);