From: adrian <> Date: Fri, 10 Aug 2001 09:20:37 +0000 (+0000) Subject: Fatal if we can't open a coss store file at init time, rather than X-Git-Tag: SQUID_3_0_PRE1~1453 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=697c29aa166d6efabbf2f5a0bff70f7ff46f5698;p=thirdparty%2Fsquid.git Fatal if we can't open a coss store file at init time, rather than first IO time. --- diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 623e56fa02..37cebe9a2e 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.cc,v 1.24 2001/08/09 21:41:53 adrian Exp $ + * $Id: store_dir_coss.cc,v 1.25 2001/08/10 03:20:37 adrian Exp $ * * DEBUG: section 81 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -155,6 +155,10 @@ storeCossDirInit(SwapDir * sd) storeCossDirOpenSwapLog(sd); storeCossDirRebuild(sd); cs->fd = file_open(sd->path, O_RDWR | O_CREAT); + if (cs->fd < 0) { + debug(81, 1) ("%s: %s\n", sd->path, xstrerror()); + fatal("storeCossDirInit: Failed to open a COSS directory."); + } n_coss_dirs++; (void) storeDirGetBlkSize(sd->path, &sd->fs.blksize); }