Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 410605
Collapse All | Expand All

(-)e2fsck/unix.c (-14 / +12 lines)
Lines 237-256 Link Here
237
	}
237
	}
238
238
239
	/*
239
	/*
240
	 * If the filesystem isn't mounted, or it's the root
240
	 * If the filesystem isn't mounted, or it's mounted read-only, and we're not 
241
	 * filesystem and it's mounted read-only, and we're not doing
241
	 * doing a read/write check, then everything's fine.
242
	 * a read/write check, then everything's fine.
243
	 */
242
	 */
244
	if ((!(ctx->mount_flags & (EXT2_MF_MOUNTED | EXT2_MF_BUSY))) ||
243
	if ((!(ctx->mount_flags & (EXT2_MF_MOUNTED | EXT2_MF_BUSY))) ||
245
	    ((ctx->mount_flags & EXT2_MF_ISROOT) &&
244
	    (((ctx->options & E2F_OPT_READONLY) ||
246
	     (ctx->mount_flags & EXT2_MF_READONLY) &&
245
	      (ctx->mount_flags & EXT2_MF_READONLY)) &&
247
	     !(ctx->options & E2F_OPT_WRITECHECK)))
246
	     !(ctx->options & E2F_OPT_WRITECHECK))) {
248
		return;
247
	        /*
249
248
		 * If the filesystem isn't root and it is mounted, let's display a
250
	if (((ctx->options & E2F_OPT_READONLY) ||
249
		 * warning
251
	     ((ctx->options & E2F_OPT_FORCE) &&
250
		 */
252
	      (ctx->mount_flags & EXT2_MF_READONLY))) &&
251
		if (!(ctx->mount_flags & EXT2_MF_ISROOT) &&
253
	    !(ctx->options & E2F_OPT_WRITECHECK)) {
252
		    (ctx->mount_flags & (EXT2_MF_MOUNTED | EXT2_MF_BUSY)))
254
		log_out(ctx, _("Warning!  %s is %s.\n"),
253
		log_out(ctx, _("Warning!  %s is %s.\n"),
255
			ctx->filesystem_name,
254
			ctx->filesystem_name,
256
			ctx->mount_flags & EXT2_MF_MOUNTED ?
255
			ctx->mount_flags & EXT2_MF_MOUNTED ?
Lines 1256-1263 Link Here
1256
		flags |= EXT2_FLAG_64BITS;
1255
		flags |= EXT2_FLAG_64BITS;
1257
	if ((ctx->options & E2F_OPT_READONLY) == 0) {
1256
	if ((ctx->options & E2F_OPT_READONLY) == 0) {
1258
		flags |= EXT2_FLAG_RW;
1257
		flags |= EXT2_FLAG_RW;
1259
		if (!(ctx->mount_flags & EXT2_MF_ISROOT &&
1258
		if (!(ctx->mount_flags & EXT2_MF_READONLY))
1260
		      ctx->mount_flags & EXT2_MF_READONLY))
1261
			flags |= EXT2_FLAG_EXCLUSIVE;
1259
			flags |= EXT2_FLAG_EXCLUSIVE;
1262
		if ((ctx->mount_flags & EXT2_MF_READONLY) &&
1260
		if ((ctx->mount_flags & EXT2_MF_READONLY) &&
1263
		    (ctx->options & E2F_OPT_FORCE))
1261
		    (ctx->options & E2F_OPT_FORCE))

Return to bug 410605