From 51b547ab4cc19b6c9bd74a519a745bd693c8e390 Mon Sep 17 00:00:00 2001 From: kcwu Date: Sat, 8 Apr 2006 14:20:12 +0000 Subject: verbose error message. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3324 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/record.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mbbsd') diff --git a/mbbsd/record.c b/mbbsd/record.c index 79523c69..bd617dbf 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -546,7 +546,10 @@ append_record(const char *fpath, const fileheader_t * record, int size) struct stat st; if ((fd = open(fpath, O_WRONLY | O_CREAT, 0644)) == -1) { - perror("open"); + char buf[STRLEN]; + assert(errno != EISDIR); + sprintf(buf, "id(%s), open(%s)", cuser.userid, fpath); + perror(buf); return -1; } flock(fd, LOCK_EX); -- cgit v1.2.3