X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=bfile%2Fbfile.c;h=b5be5b59d8b0732a01a1fa2648d0aa95d6395631;hb=f69ee5ec6b2a86b7ac049992c19b9b0410705404;hp=d8dfa84dd0e433752abf7d4b49616bc7bbb575c0;hpb=739c40544bc2451275f046134d096241a6304796;p=idzebra-moved-to-github.git diff --git a/bfile/bfile.c b/bfile/bfile.c index d8dfa84..b5be5b5 100644 --- a/bfile/bfile.c +++ b/bfile/bfile.c @@ -4,7 +4,16 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: bfile.c,v $ - * Revision 1.4 1994-08-17 14:27:32 quinn + * Revision 1.7 1994-08-23 14:25:45 quinn + * Added O_CREAT because some geek wanted it. Sheesh. + * + * Revision 1.6 1994/08/23 14:21:38 quinn + * Fixed call to log + * + * Revision 1.5 1994/08/18 08:10:08 quinn + * Minimal changes + * + * Revision 1.4 1994/08/17 14:27:32 quinn * last mods * * Revision 1.2 1994/08/17 14:09:32 quinn @@ -20,6 +29,7 @@ #include #include #include +#include int bf_close (BFile bf) { @@ -32,9 +42,9 @@ BFile bf_open (const char *name, int block_size, int wflag) { BFile tmp = xmalloc(sizeof(BFile_struct)); - if ((tmp->fd = open(name, wflag ? O_RDWR : O_RDONLY, 0666)) < 0) + if ((tmp->fd = open(name, wflag ? O_RDWR|O_CREAT : O_RDONLY, 0666)) < 0) { - log(LOG_FATAL, "open: %s"); + log(LOG_FATAL|LOG_ERRNO, "open"); return(0); } tmp->block_size = block_size;