--- a/src/common.h Sun Feb 6 10:08:24 2005 +++ b/src/common.h Sat Jan 7 19:43:30 2006 @@ -371,7 +371,7 @@ void file_go_end( void); void file_next_block( void); void file_prev_block( void); -void file_getsize( void); +void file_getsize(int force); int file_is_a_valid_offset( off_t offset); /* help.c */ --- a/src.orig/file.c Sun Feb 6 10:08:24 2005 +++ b/src/file.c Sat Jan 7 19:43:20 2006 @@ -112,7 +112,7 @@ return; } - file_getsize(); + file_getsize(0); } @@ -239,8 +239,10 @@ * * Some code for getting the size of devices were obtained from the * e2fsprogs v1.06 package made by Theodore Ts'o and Remy Card. + * If is not 0, size will be asked to the user whatever the + * file type. */ -void file_getsize( void) +void file_getsize(int force) { #if defined(VCHE_NC) WINDOW *w; @@ -265,7 +267,7 @@ * we must find his size, because fstat(2) will not * give us that information. */ - if( ( stbuf.st_mode & S_IFMT) != S_IFREG) { + if(force || ( stbuf.st_mode & S_IFMT) != S_IFREG) { i = lib_ask( "You are opening a device, how do yo want to get his size?", " Ask kernel ", " Let vche guess it ", " Enter it manually ", 0); term_hide_cursor(); --- a/src.orig/hex.c Sun Feb 6 10:08:24 2005 +++ b/src/hex.c Sat Jan 7 19:43:50 2006 @@ -133,7 +133,7 @@ lib_flush(); break; /* Refresh file size */ - case 'R': file_getsize(); + case 'R': file_getsize(1); lib_fill_obuffer(); hex_showfile(); lib_flush();