Home | History | Annotate | Download | only in e2fsck

Lines Matching refs:ctx

39 void fatal_error(e2fsck_t ctx, const char *msg)
43 if (ctx->fs && ctx->fs->io) {
44 if (ctx->fs->io->magic == EXT2_ET_MAGIC_IO_CHANNEL)
45 io_channel_flush(ctx->fs->io);
49 ctx->flags |= E2F_FLAG_ABORT;
50 if (ctx->flags & E2F_FLAG_SETJMP_OK)
51 longjmp(ctx->abort_loc, 1);
55 void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
67 fatal_error(ctx, buf);
73 char *string_copy(e2fsck_t ctx EXT2FS_ATTR((unused)),
189 int ask (e2fsck_t ctx, const char * string, int def)
191 if (ctx->options & E2F_OPT_NO) {
195 if (ctx->options & E2F_OPT_YES) {
199 if (ctx->options & E2F_OPT_PREEN) {
206 void e2fsck_read_bitmaps(e2fsck_t ctx)
208 ext2_filsys fs = ctx->fs;
212 if (ctx->invalid_bitmaps) {
213 com_err(ctx->program_name, 0,
215 ctx->device_name);
216 fatal_error(ctx, 0);
223 com_err(ctx->program_name, retval,
225 ctx->device_name);
226 fatal_error(ctx, 0);
230 void e2fsck_write_bitmaps(e2fsck_t ctx)
232 ext2_filsys fs = ctx->fs;
241 com_err(ctx->program_name, retval,
243 ctx->device_name);
244 fatal_error(ctx, 0);
253 com_err(ctx->program_name, retval,
255 ctx->device_name);
256 fatal_error(ctx, 0);
261 void preenhalt(e2fsck_t ctx)
263 ext2_filsys fs = ctx->fs;
265 if (!(ctx->options & E2F_OPT_PREEN))
269 ctx->device_name);
353 void e2fsck_read_inode(e2fsck_t ctx, unsigned long ino,
358 retval = ext2fs_read_inode(ctx->fs, ino, inode);
362 fatal_error(ctx, 0);
366 extern void e2fsck_write_inode_full(e2fsck_t ctx, unsigned long ino,
372 retval = ext2fs_write_inode_full(ctx->fs, ino, inode, bufsize);
376 fatal_error(ctx, 0);
380 extern void e2fsck_write_inode(e2fsck_t ctx, unsigned long ino,
385 retval = ext2fs_write_inode(ctx->fs, ino, inode);
389 fatal_error(ctx, 0);
404 blk_t get_backup_sb(e2fsck_t ctx, ext2_filsys fs, const char *name,
416 if (ctx) {
417 ctx->superblock = ret_sb;
418 ctx->blocksize = fs->blocksize;
423 if (ctx) {
424 if (ctx->blocksize) {
425 ret_sb = ctx->blocksize * 8;
426 if (ctx->blocksize == 1024)
428 ctx->superblock = ret_sb;
431 ctx->superblock = ret_sb;
432 ctx->blocksize = 1024;
461 if (ctx) {
462 ctx->superblock = superblock;
463 ctx->blocksize = blocksize;