Revive NetBSD support #9

Merged
SlavekB merged 1 commits from feat/revive-netbsd-support into master 5 years ago
obache commented 5 years ago
Collaborator
  • check statvfs(2) support

    • it is conditional but not checked with CMake
    • statfs(2) had been removed since NetBSD-3
    • modern DragonFly BSD should be no issue about statvfs(3)
  • APM support

    • catch up to others changes
    • APM support on NetBSD is not only on i386 but also may emulated on others
* check statvfs(2) support * it is conditional but not checked with CMake * statfs(2) had been removed since NetBSD-3 * modern DragonFly BSD should be no issue about statvfs(3) * APM support * catch up to others changes * APM support on NetBSD is not only on i386 but also may emulated on others
obache commented 5 years ago
Poster
Collaborator

For FilesystemStats in KSIM part,

Even if statvfs exists, getvfsstat may not exists.
Such conditions should be checked individually.

Current usage of getfsstat only get fixed 32 entries.
getfsstat(NULL, 0) will retrun size of entries, so it should be use as
entry buffer size instead, but getmntinfo should make the job easiler.

Incidentally, it seems that KMountPoint in TDECore has same job, collect mounted filesystems, but for different information.

For FilesystemStats in KSIM part, Even if `statvfs` exists, `getvfsstat` may not exists. Such conditions should be checked individually. Current usage of `getfsstat` only get fixed 32 entries. `getfsstat(NULL, 0)` will retrun size of entries, so it should be use as entry buffer size instead, but `getmntinfo` should make the job easiler. Incidentally, it seems that `KMountPoint` in `TDECore` has same job, collect mounted filesystems, but for different information.
obache commented 5 years ago
Poster
Collaborator

Created new PR for KSIM part as #10

Created new PR for KSIM part as #10
obache commented 5 years ago
Poster
Collaborator

change diff to be minimalized

change diff to be minimalized
obache changed title from WIP: Revive NetBSD support to Revive NetBSD support 5 years ago
SlavekB reviewed 5 years ago
SlavekB left a comment
Owner

It looks okay, only there is an unusual thing, please explain it.

It looks okay, only there is an unusual thing, please explain it.
#endif // HAVE_MACHIE_APM_BIOS_H
#if !defined( HAVE_DEV_APM_APMIO_H )
#cmakedefine HAVE_DEV_APM_APMIO_H
#endif // HAVE_DEV_APM_APMIO_H
Owner

I don't understand why there are conditions instead of simple #cmakedefine?

I don't understand why there are conditions instead of simple `#cmakedefine`?
obache commented 5 years ago
Poster
Collaborator

probably, just copy from the above format.

maybye, it is better to define NetBSD_APM instead.

probably, just copy from the above format. maybye, it is better to define __NetBSD_APM__ instead.
Owner

Oh, thank you, I didn't notice that the code above is the same way.

Oh, thank you, I didn't notice that the code above is the same way.
SlavekB closed this pull request 5 years ago
SlavekB deleted branch feat/revive-netbsd-support 5 years ago
SlavekB added this to the R14.0.7 release milestone 5 years ago
The pull request has been merged as f8424834b6.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdeutils#9
Loading…
There is no content yet.