diff options
author | fredb <fredb@pkgsrc.org> | 2002-05-24 16:32:52 +0000 |
---|---|---|
committer | fredb <fredb@pkgsrc.org> | 2002-05-24 16:32:52 +0000 |
commit | f08e35b60f4f5e078742c19a29f85494a34e4cb1 (patch) | |
tree | c54255c729e2da834de4289c7c68607f048e8e26 /sysutils | |
parent | cf8f2160d853bd1e6e5daef8316b5b61dd7ce0c3 (diff) | |
download | pkgsrc-f08e35b60f4f5e078742c19a29f85494a34e4cb1.tar.gz |
The drivers don't have to msync() the shared, mmap()-ed file after
every write, but only once after it's fully initialized, before it's
renamed and declared open for business. Analysis by Martin Husemann.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/ups-nut/distinfo | 4 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-aa | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/sysutils/ups-nut/distinfo b/sysutils/ups-nut/distinfo index 3f83e98bdaf..e80f4b745ba 100644 --- a/sysutils/ups-nut/distinfo +++ b/sysutils/ups-nut/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.11 2002/05/22 18:02:33 fredb Exp $ +$NetBSD: distinfo,v 1.12 2002/05/24 16:32:52 fredb Exp $ SHA1 (nut-0.45.5.tar.gz) = 5cb08e27fb7e528a453d164d401410d341bf3bb3 Size (nut-0.45.5.tar.gz) = 386936 bytes -SHA1 (patch-aa) = 4d67a9c655b4fa57aea5e5cf4d7754030b873fa3 +SHA1 (patch-aa) = 74fcdb7d75dcc7a53b0591bd22ff5c6bbeb572ff SHA1 (patch-ab) = fac1a47430a2c2d692ecede2ac6ed78c60a82566 SHA1 (patch-ad) = 1132a678cc53882cc92764ed17bbd4cf4152c58d SHA1 (patch-ag) = b6ae992f9b92d68683ac6adb7378d11158cc1fdc diff --git a/sysutils/ups-nut/patches/patch-aa b/sysutils/ups-nut/patches/patch-aa index 66fff133194..ff702417bf6 100644 --- a/sysutils/ups-nut/patches/patch-aa +++ b/sysutils/ups-nut/patches/patch-aa @@ -1,12 +1,15 @@ -$NetBSD: patch-aa,v 1.4 2002/05/22 18:02:34 fredb Exp $ +$NetBSD: patch-aa,v 1.5 2002/05/24 16:32:52 fredb Exp $ ---- models/upscommon.c.orig Fri May 17 00:27:55 2002 +--- models/upscommon.c.orig Fri Mar 15 00:59:57 2002 +++ models/upscommon.c -@@ -588,6 +588,7 @@ +@@ -716,6 +716,10 @@ + return; } - memcpy(shared_info, info, info_size); ++#ifdef HAVE_MMAP ++ /* sync external file representation before operating on the file */ + msync(shared_info, info_size, MS_INVALIDATE); ++#endif + ret = rename(initfn, statefn); - if (shmid >= 0) { - struct shmid_ds shmbuf; + if (ret != 0) |