Ticket #1968 (new enhancement) — at Version 1
mcview: need view blockdevice
Reported by: | angel_il | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mcview | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: |
Description (last modified by angel_il) (diff)
now it's forbidden
if (!S_ISREG (st.st_mode)) { mc_close (fd); mcview_show_error (view, _(" Cannot view: not a regular file ")); g_free (view->filename); view->filename = NULL; goto finish; }
and we have one problem - calculate filesize.
fstat return 0 for block devices...
as a workaround, we can use ftell like this
off_t mc_ftell (int fd) { fseek(fd, 0L, SEEK_END); return ftell(fd); }
Note: See
TracTickets for help on using
tickets.