Tookmund / Swapspace

A fork of Jeroen T. Vermeulen's excellent dynamic swap space manager
GNU General Public License v2.0
139 stars 13 forks source link

FreeBSD/DragonFlyBSD Support #14

Open Raj2032 opened 5 years ago

Raj2032 commented 5 years ago

Is it compatible with BSD specifically with DragonFlyBSD (based on FreeBSD)?

Tookmund commented 5 years ago

Unfortunately the current code does not. The main thing standing in the way of this is that FreeBSD requires swapfiles to be added as an md device

I assume DragonFly does as well, but their handbook doesn't say.

This is certainly not an impossible task, but it would be considerable effort to make sure /etc/fstab and /var/lib/swapspace/ were always in sync and bad things might happen if the user were to edit the file while swapspace was running.

There are likely other problems as well, like linux-specific headers (eg. <sys/swap.h> ) that would need ifdefs and there'd need to be a wrapper on swapon as the FreeBSD version does not accept flags.

Patches certainly welcome!

Raj2032 commented 5 years ago

Thanks for your help then :) Do you know any other third party programs?