From 697c29aa166d6efabbf2f5a0bff70f7ff46f5698 Mon Sep 17 00:00:00 2001 From: adrian <> Date: Fri, 10 Aug 2001 09:20:37 +0000 Subject: [PATCH] Fatal if we can't open a coss store file at init time, rather than first IO time. --- src/fs/coss/store_dir_coss.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); } -- 2.47.3