CVSROOT: /sources/hurdextras
Module name: mboxfs
Changes by: Samuel Thibault <sthibaul> 24/11/16 17:12:19
Modified files:
. : ChangeLog backend.h mboxfs.c netfs.c
Log message:
fix 64b build
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mboxfs/ChangeLog?cvsroot=hurdextras&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/mboxfs/backend.h?cvsroot=hurdextras&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/mboxfs/mboxfs.c?cvsroot=hurdextras&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/mboxfs/netfs.c?cvsroot=hurdextras&r1=1.4&r2=1.5
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/hurdextras/mboxfs/ChangeLog,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ChangeLog 8 Jul 2013 08:59:00 -0000 1.5
+++ ChangeLog 16 Nov 2024 22:12:19 -0000 1.6
@@ -1,205 +1,75 @@
-2013-07-08 Samuel Thibault <[email protected]>
+2023-10-03 21:28 sthibaul
- * mboxfs.c (mboxfs_parse_opts): Rename sate parameter into state.
+ * backend.h, fs.c, mboxfs.c, netfs.c: Fix build
-2013-07-08 Cyril Roelandt <[email protected]>
+2020-08-01 18:24 sthibaul
- * mboxfs.c (mboxfs_parse_opts): Gracefully handle the errors using
+ * mboxfs.c: Migrate mboxfs to libpthread
+
+2013-07-08 11:01 sthibaul
+
+ * mboxfs.c: fix coding style
+
+2013-07-08 10:59 sthibaul
+
+ * ChangeLog, mboxfs.c: 2013-07-08 Samuel Thibault
+ <[email protected]>
+
+ * mboxfs.c (mboxfs_parse_opts): Rename sate parameter
+ into state.
+
+2013-07-08 10:57 sthibaul
+
+ * ChangeLog, mboxfs.c: 2013-07-08 Cyril Roelandt
+ <[email protected]>
+
+ * mboxfs.c (mboxfs_parse_opts): Gracefully handle the
+ errors using
argp_error instead of error.
-2012-02-10 Samuel Thibault <[email protected]>
+2013-02-10 11:26 sthibaul
+
+ * ChangeLog, Makefile, debug.c, netfs.c: 2012-02-10 Samuel
+ Thibault <[email protected]>
Fix build against libpthread.
* Makefile: Link against libpthread instead of libthreads
- * debug.c: Include pthread.h instead of cthreads.h. Turn debug_lock
+ * debug.c: Include pthread.h instead of cthreads.h. Turn
+ debug_lock
into a pthread_mutex_t instead of struct mutex.
- (__debug_start): Use pthread_mutex_lock instead of mutex_lock.
- (__debug_end): Use pthread_mutex_unlock instead of mutex_unlock.
- * netfs.c (netfs_attempt_lookup, netfs_attempt_create_file): Use
+ (__debug_start): Use pthread_mutex_lock instead of
+ mutex_lock.
+ (__debug_end): Use pthread_mutex_unlock instead of
+ mutex_unlock.
+ * netfs.c (netfs_attempt_lookup,
+ netfs_attempt_create_file): Use
pthread_mutex_unlock instead of mutex_unlock.
-Ludovic Courtès <[email protected]> made these changes:
-
-2003-01-21
+2006-04-12 13:31 mmenal
- * fs.[ch]: Updated from tarfs (fixes the symlink access problem
- where "cat l" would show the symlink target instead of its
- contents).
- * debug.[ch]: Imported from tarfs too.
-
-2002-11-13
-
- * Makefile (CFLAGS): Added -D_FILE_OFFSET_BITS=64.
- * mutt/Makefile (CFLAGS): Likewise.
- * mboxfs.c: Added netfs_server_name and netfs_server_version
- (all these changes are due to the interface change from 0.2
- to 0.3).
- * fsutils.[ch]: Removed.
- * fs.[ch]: New files taken from tarfs.
-
-2002-08-18
-
- * version.h: File removed
- * netfs.c: Updated from the latest tarfs changes
- * backend.h: Likewise
- * mboxfs.c (mboxfs_init): Call NEW_NODE_INFO on netfs_root_node
- so that netfs_attempt_lookup() doesn't crash when trying to lookup
- a non-existing node in /.
-
-2002-08-03
-
- * mboxfs.c (mboxfs_get_args): appends filename to the arglist
-
-2002-06-20
-
- * backend.h: added get_argp, get_args and set_options to
- struct fs_backend in order to enable fsysopt support.
- * mboxfs.c: implemented the corresponding functions.
- * main.c: argument parsing moved to mboxfs.c.
-
-2002-06-14
-
- * fsutils.c: now handles st_nlink correcty (see fs_make_subdir()).
- * fsutils.c: _make_node(): use a unique inode number (nn_stat.st_ino)
- for each node -> "find -name \*" now works!
- * mboxfs.c: mboxfs_read_text_node(): checks whether io_read() allocated
- a new buffer and unmap() it.
- * fsutils.c: _make_node(): changed it so that new entries are added at
- the end of the linked list. For mboxfs, this allows having node
- 00001.mail *after* node 00000.mail in the list.
-
-2002-06-08
-
- * mboxfs.c: mboxfs_read_text_node(): identified a bug when reading
- more than the actual size of an email.
- * mboxfs.c: added the `threaded' (--no-timeout) option so that
- mbox gets parsed in a separate thread.
- * path.c: renamed to fsutils.c
- * fsutils.c: new file
- * backend.h: removed read_link from struct fs_backend since it is
- no longer backend dependent (see field link in struct netnode)
-
-2002-05-31
-
- * path.c: fs_make_node(): checks for existing node.
- * path.c: get_common_root(): new function that returns the
- `deepest common root' of two nodes.
- * path.c: fs_link_node(): removed last arg since rootdir is now
- obtained using get_common_root().
- * mboxfs.c: mboxfs_add_attach() creates symlinks when create an
- attach dir for an email that already has one somewhere, using
- the attach_dir field in struct mboxfs_info.
- FIXME: mboxfs_add_sender() never creates symlinks.
-
-2002-05-24
-
- * mboxfs.c: in mboxfs_lookup_node(), creation `on the fly' of
- DIR_SENDERS, DIR_RCPT, or DIR_THREADS when relevant.
-
-2002-05-17
-
- * mutt/handler.c: added a bad hack(tm) so that mutt_decode_base64() does
- nothing when len<3.
- * mboxfs_defs.h: added the mboxfs_node_t thing and the type field in
- struct mboxfs_info so that each node is `typed'.
- * mboxfs.c: mboxfs_lookup_node() can create a DIR_SENDERS when relevant,
- on the fly, base on the contents of the current directory.
-
-2002-05-14
-
- * mboxfs.c: mboxfs_read_attach_node() cleaned and working at least with
- xbit and base64 encodings.
- * mutt/handler.c: mutt_decode_base64() adjusted so that it reads at most
- s->datacnt - s->datacnt%3.
- * mboxfs.h: added the mboxfs_options var. and also the --force-mmdf
- option (untested).
- * mutt: removed regex.c, _regex.h (now only uses GNU Regexp).
-
-2002-05-13
-
- * backend.h: merged common.h and backend.h
- * mboxfs.c: in mboxfs_lookup_node(), started an example of `on-the-fly'
- creation of a `from' directory.
- * mboxfs.c: brand new mboxfs_read_attach_node() with a per-node cache
- system (see struct attach_info) which appears to work; however,
- base64 attachments are still kind of `out of order'. :(
-
-2002-05-03
-
- * path.c: added fs_make_node(), fs_add_subdir() taken from mboxfs.c
- and created fs_link_node().
- * common.h: contains a new more general definition of struct netnode.
- * mboxfs.c: uses the new info field of struct netnode and path.c
- functions.
- * samplefs.c: likewise.
- * mboxfs_defs.h: simplified struct mboxfs_info.
-
-2002-05-01
-
- * mutt/parse.c: Regexp fix in mutt_read_rfc822_header(): regexp parsing
- of the subject field (in order to differentiate env->subject from
- env->real_subj by removing the "Re:") now works.
- * mboxfs.c: added thread support.
- * path.c: added filter_node_name().
- * handler.c: (binary attachs bug not fixed)
-
-2002-04-29
-
- * mutt.h: other bugfixes in state_puts(). :)
- added state_nputs() used by mutt_decoder_pop_to_state()
- when calling mutt_decode_pop() (bugfix).
- * mboxfs.c:
- optimization in mboxfs_read_attach_node(): don't start from scratch
- if requested offset (OFFS) is greater than BYTES_READ.
- (all kind of attachments seem to work, but uuencoded has not been
- tested).
-
-2002-04-24
-
- * mutt.h: bugfixes with macros state_put[sc]
- * handler.c: small bug (?) with mutt_decode_base64()
-
-2002-04-23
-
- * mboxfs.c: mboxfs_read_attach_node ()
- -> starts working with mutt_decode_xbit (); keeps track of the
previous
- decoding request;
- * handler.c and mutt.h:
- -> final change to state_put[sc](), created _setlen().
-
-2002-04-22
-
- * Updated the argp stuff, added a `--full-headers' option.
- * First attempt at attach decoding on the fly
- -> changes in libmutt: added handler.c which contains
- mutt_decode_attachment();
- -> changed STATE (in mutt.h) to use a BUFFER instead of a
- FILE;
- -> doesn't work, no idea of how to do it cleanly. :(
-
-2002-04-17
-
- * Changes and bufixes in libmutt: now supports attachments.
- * Attachments supported by mboxfs now in
(from|to)/<sender>/attach/xxxxx.mail .
- -> TODO: Decode mime attachments on the fly in mboxfs_read_node().
-
-2002-04-16
-
- * Added mboxfs_add_rcpt(), add_sender() and add_date().
- * Works with date/MmmYYYY/from and date/MmmYYYY/to . :)
- * Uses get_path*(), in path.[ch].
-
-2002-04-15 Ludovic Courtès <[email protected]>
-
- * Added read_link to struct fs_backend.
- * Wrote mboxfs_read_link():
- each entry in DIR_RCPT is shown as a symblink to the corresponding
- entry in DIR_SENDERS;
- symlinks' target paths are created using get_path() and
- get_path_to_root().
- * Finally, get_path*() are unused, due to the fact that the size of
- the target path has to be known when the symlink is created (st_size).
- Therefore, nn->link is used instead.
+ * ChangeLog, README, TODO, backend.h, debug.c, debug.h, fs.c, fs.h,
+ fsutils.c, fsutils.h, main.c, mboxfs.c, mboxfs.h, mboxfs_defs.h,
+ netfs.c, samplefs.c, samplefs.h, mutt/Makefile: Fixed headers
+ (new email), ChangeLog and TODO.
+
+2006-04-11 16:09 tschwinge
+
+ * Changelog: Remove doubled file Changelog.
+
+2006-04-11 15:12 mmenal
+
+ * BUGS, ChangeLog, Changelog, Makefile, README, TODO, backend.h,
+ debug.c, debug.h, fs.c, fs.h, fsutils.c, fsutils.h, main.c,
+ mboxfs.c, mboxfs.h, mboxfs_defs.h, netfs.c, samplefs.c,
+ samplefs.h, setaliases.sh, mutt/Makefile, mutt/README, mutt/TODO,
+ mutt/charset.c, mutt/charset.h, mutt/date.c, mutt/date.h,
+ mutt/from.c, mutt/handler.c, mutt/hash.c, mutt/hash.h,
+ mutt/lib.c, mutt/lib.h, mutt/mailbox.h, mutt/mbox.c, mutt/mbox.h,
+ mutt/mime.h, mutt/mutt.h, mutt/mutt_regex.h, mutt/muttlib.c,
+ mutt/mx.c, mutt/parse.c, mutt/parse.h, mutt/protos.h,
+ mutt/recvattach.c, mutt/rfc2047.c, mutt/rfc2047.h,
+ mutt/rfc2231.c, mutt/rfc2231.h, mutt/rfc822.c, mutt/rfc822.h,
+ mutt/test.c: Initial commit of a mboxfs translator written by
+ Ludovic Courtes (Manuel)
-vim:ts=8:ft=changelog:
Index: backend.h
===================================================================
RCS file: /sources/hurdextras/mboxfs/backend.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- backend.h 3 Oct 2023 19:28:17 -0000 1.3
+++ backend.h 16 Nov 2024 22:12:19 -0000 1.4
@@ -60,7 +60,7 @@
void (* get_argp)(struct argp *s);
/* Get arguments (see netfs_append_args()). */
- error_t (*get_args)(char **argz, unsigned *argz_len);
+ error_t (*get_args)(char **argz, size_t *argz_len);
/* Set options (see netfs_set_options()). */
error_t (*set_options)(const char *argz, size_t argz_len);
Index: mboxfs.c
===================================================================
RCS file: /sources/hurdextras/mboxfs/mboxfs.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- mboxfs.c 3 Oct 2023 19:28:17 -0000 1.7
+++ mboxfs.c 16 Nov 2024 22:12:19 -0000 1.8
@@ -122,7 +122,7 @@
* of arguments.
*/
error_t
-mboxfs_get_args (char **argz, unsigned *argz_len)
+mboxfs_get_args (char **argz, size_t *argz_len)
{
error_t err = 0;
@@ -905,23 +905,26 @@
else
{
void* d = data;
+ mach_msg_type_number_t num = *len;
if (mbox == MACH_PORT_NULL)
mbox = file_name_lookup (main_context.path, O_READ, 0);
assert (mbox != MACH_PORT_NULL);
size = end - start - offset;
- size = (size > *len)?(*len):size;
- *len = size;
- err = io_read (mbox, (data_t*)&data, len, start + offset, size);
- assert (*len <= size);
+ size = (size > num)?(num):size;
+ num = size;
+ err = io_read (mbox, (data_t*)&data, &num, start + offset, size);
+ assert (num <= size);
/* Checks whether io_read() has allocated a new buffer. */
if (data != d) // this shouldn't happen
{
- memcpy (d, data, *len);
- munmap (data, *len);
+ memcpy (d, data, num);
+ munmap (data, num);
}
+
+ *len = num;
}
return err;
}
Index: netfs.c
===================================================================
RCS file: /sources/hurdextras/mboxfs/netfs.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- netfs.c 3 Oct 2023 19:28:17 -0000 1.4
+++ netfs.c 16 Nov 2024 22:12:19 -0000 1.5
@@ -357,7 +357,7 @@
CRED. NP is locked. */
error_t
netfs_set_translator (struct iouser *cred, struct node *np,
- const char *argz, size_t argzlen)
+ const char *argz, mach_msg_type_number_t argzlen)
{
return EROFS;
}
@@ -369,7 +369,7 @@
*ARGZ_LEN to the total length. */
error_t
netfs_get_translator (struct node *node, char **argz,
- size_t *argz_len)
+ mach_msg_type_number_t *argz_len)
{
*argz_len = 0;
*argz = (char*)malloc (sizeof (char));
@@ -521,7 +521,7 @@
list of the arguments to this translator. The default definition of this
routine simply calls netfs_append_std_options. */
error_t
-netfs_append_args (char **argz, unsigned *argz_len)
+netfs_append_args (char **argz, size_t *argz_len)
{
error_t err = 0;
if (backend.get_args)
_______________________________________________
Hurdextras-commit mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/hurdextras-commit