Ticket #1642 (closed enhancement: fixed)
filegui.c contains Linux-specific things
Reported by: | sfionov | Owned by: | slavazanko |
---|---|---|---|
Priority: | major | Milestone: | 4.7.0-pre4 |
Component: | mc-core | Version: | 4.7.0-pre2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
mc 4.7.0-pre1 introduced dynamic "Save attributes" checkbox value in Copy/Move? dialog.
But code is Linux-specific, and not even isolated by macros.
I suggest to add code specific for BSD and SVR4 systems.
In BSD systems (MacOS X, NetBSD, FreeBSD) there is statfs.f_fstypename which contains name of filesystem.
Valid FS names are: msdos, msdosfs (FreeBSD), ntfs, smbfs, procfs, fusefs (BSD), fusefs_subfstype (Mac)
In SVR4 systems (Solaris and other SVR4 Unixes) there are statvfs.f_basetype and statvfs syscall instead of statfs and also autotools define STAT_STATVFS.
Valid FS names are: pcfs, proc, ntfs, fuse, smbfs
(Note that NetBSD 3.0+ also use statvfs but with BSD syntax.)
For all other OSes we simply return 1.
I attached a proposed patch tested on Linux, Solaris and FreeBSD.
Attachments
Change History
comment:1 Changed 15 years ago by sfionov
Updated patch with refined macro conditions. Compiles and works at least on Linux, FreeBSD, NetBSD and Solaris.
comment:3 Changed 15 years ago by slavazanko
- Owner set to slavazanko
- Status changed from new to accepted
comment:4 Changed 15 years ago by slavazanko
- severity changed from no branch to on review
Please, in future prepare patches via git format-patch command.
Created branch 1642_linux_specific_things
initial changeset:5643f591530737aa90a2e4a1a342bc8866ce06e5
review, please.
comment:6 Changed 15 years ago by sfionov
- Votes for changeset slavazanko deleted
- severity changed from on review to on rework
Please pull into a new branch from
git://github.com/sigwall/mc-dev.git 1642_fstype
Shortlog:
Sergey Fionov (3): Merge branch '1642_linux_specific_things' of git://midnight-commander.org/git/mc into 1642_fstype Ticket #1642 Ticket #1642: Revert configure.ac sfionov (1): Ticket #1642: filegui.c contains Linux-specific things
Diffstat:
m4.include/ac-get-fs-info.m4 | 5 ++++ src/filegui.c | 51 +++++++++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 13 deletions(-)
comment:7 Changed 15 years ago by slavazanko
- severity changed from on rework to on review
Looks good.
Not all developers have full access to Internet (but have full access to m-c.o). Therefore, branch 1642_fstype was copied to upstream repo:
initial changeset:20c3ae911c8972c8b3b629130336d73f32b12071
review, please.
comment:8 Changed 15 years ago by andrew_b
Please use #ifdef or #if defined forms of preprocessor directives instead of
#if USE_STATFS || USE_STATVFS
comment:10 Changed 15 years ago by slavazanko
- Votes for changeset set to slavazanko
Looks good. See 1642_fstype branch:
- 23f14286a99070c50de196c04044674632d0073c Replace if macros by ifdef
- 87afc853666e32f0023c5471a41a3aadad79ba50 Revert configure.ac
- ff8c4e2ce0d63366d3d19b6cdffb56c670eb6aff Move configure.ac changes to m4.include/ac-get-fs-info.m4
- a8530da70b353ac78f82a9026ff4c8c1dd710acf Ticket #1642: filegui.c contains Linux-specific things
Vote here.
comment:11 Changed 15 years ago by andrew_b
- Votes for changeset changed from slavazanko to slavazanko andrew_b
- severity changed from on review to approved
comment:12 Changed 15 years ago by slavazanko
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko andrew_b to commited-master
- Resolution set to fixed
- severity changed from approved to merged
comment:14 Changed 15 years ago by slavazanko
Sorry, Merge changeset is 720eca3fa39b4f51ef5bfde4bb5733dced9578e5
comment:15 Changed 15 years ago by zaytsev
WARNING!!!
misc/skins/Makefile.am ¶
r6d5ccc rca7909
4 4 default.ini \
5 5 gotar.ini \
6 darkfar.ini \
THAT DOES NOT BELONG TO THIS CHANGESET AND MIGHT BREAK RPM BUILDS IF YOU DON'T UPDATE THE PACKAGES ACCORDINGLY!!!