aboutsummaryrefslogtreecommitdiff
path: root/libftpconn
Commit message (Collapse)AuthorAgeFilesLines
* libftpconn: add out >= 2 condition to make GCC happyFlavio Cruz2023-12-291-1/+1
| | | | Message-ID: <20231229212105.858759-10-flaviocruz@gmail.com>
* libftpconn: Fix memory leak on errorSamuel Thibault2023-01-011-1/+4
|
* Simplify deallocations.Justus Winter2017-08-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | free (NULL) is a nop, therefore it is not necessary to check that first. Simplify the code accordingly. This commit is the result of the following semantic patch: @@ identifier X; @@ -if (X) free (X); +free (X); * console-client/console.c: Simplify accordingly. * console-client/driver.c: Likewise. * console-client/vga.c: Likewise. * ftpfs/dir.c: Likewise. * libftpconn/unix.c: Likewise. * libps/fmt.c: Likewise. * libps/proclist.c: Likewise. * libstore/mvol.c: Likewise. * nfs/ops.c: Likewise. * proc/host.c: Likewise. * sutils/fstab.c: Likewise.
* fix compiler warnings in hurd/libftpconnFlavio Cruz2015-12-292-4/+3
|
* Replace `bzero' with `memset'Justus Winter2014-12-103-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
* Normalize whitespace at the end of each file to '\n'Justus Winter2013-11-091-1/+0
| | | | | Some files were not normalized. In console/motd.UTF8 the additional newline is intentional. Empty files were excluded as well.
* Replace fragile manual »make dist« system with one based on »git archive«.Thomas Schwinge2012-04-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makeconf (lndist): Remove target. (dist-hook, dist.tar): New targets. * Makefile (dist): Rewrite this target's as well as accompanying rules. (%-lndist, cp-linked-files, $(lf-inst)): Remove targets. (%.bz2, %.gz, %/dist-hook): New targets. (DISTFILES): Set. * doc/Makefile (DISTFILES): Set. * doc/Makefile (lndist, lndist-info-targets): Remove targets. * include/Makefile (lndist): Remove target. * libthreads/Makefile (lndist, lndist-i386-files, lndist-map-file): Remove targets. * pfinet/Makefile (lndist, lndist-linux-src-net-core-files) (lndist-linux-src-net-ethernet-files, lndist-linux-src-net-ipv4-files) (lndist-linux-src-net-ipv6-files, lndist-linux-src-asm-files) (lndist-linux-src-include-linux-files, lndist-linux-src-include-net-files) (lndist-linux-src-include-asm-files, lndist-glue-include-linux-files) (lndist-glue-include-asm-files): Remove targets. * auth/Makefile (LCLHDRS): Don't set. * boot/Makefile (LCLHDRS, DIST_FILES): Likewise. * bsdfsck/Makefile (LCLHDRS): Likewise. * config/Makefile (DIST_FILES): Likewise. * console-client/Makefile (LCLHDRS): Likewise. * console/Makefile (LCLHDRS, DIST_FILES): Likewise. * doc/Makefile (DIST_FILES): Likewise. * exec/Makefile (LCLHDRS, DIST_FILES): Likewise. * ext2fs/Makefile (LCLHDRS): Likewise. * fatfs/Makefile (LCLHDRS): Likewise. * ftpfs/Makefile (LCLHDRS): Likewise. * hostmux/Makefile (LCLHDRS): Likewise. * hurd/Makefile (DIST_FILES): Likewise. * include/Makefile (LCLHDRS): Likewise. * isofs/Makefile (LCLHDRS, DIST_FILES): Likewise. * libcons/Makefile (LCLHDRS): Likewise. * libdirmgt/Makefile (LCLHDRS): Likewise. * libdiskfs/Makefile (LCLHDRS): Likewise. * libfshelp/Makefile (LCLHDRS): Likewise. * libftpconn/Makefile (LCLHDRS): Likewise. * libihash/Makefile (LCLHDRS): Likewise. * libiohelp/Makefile (LCLHDRS): Likewise. * libnetfs/Makefile (LCLHDRS): Likewise. * libpager/Makefile (LCLHDRS): Likewise. * libpipe/Makefile (LCLHDRS): Likewise. * libports/Makefile (LCLHDRS): Likewise. * libps/Makefile (LCLHDRS): Likewise. * libshouldbeinlibc/Makefile (LCLHDRS): Likewise. * libstore/Makefile (LCLHDRS, DIST_FILES): Likewise. * libthreads/Makefile (LCLHDRS): Likewise. * libtreefs/Makefile (LCLHDRS): Likewise. * libtrivfs/Makefile (LCLHDRS): Likewise. * mach-defpager/Makefile (LCLHDRS): Likewise. * nfs/Makefile (LCLHDRS): Likewise. * nfsd/Makefile (LCLHDRS): Likewise. * pfinet/Makefile (LCLHDRS): Likewise. * pflocal/Makefile (LCLHDRS): Likewise. * proc/Makefile (LCLHDRS, DIST_FILES): Likewise. * release/Makefile (DIST_FILES): Likewise. * storeio/Makefile (LCLHDRS): Likewise. * sutils/Makefile (LCLHDRS): Likewise. * term/Makefile (LCLHDRS, DIST_FILES): Likewise. * tmpfs/Makefile (LCLHDRS): Likewise. * ufs-fsck/Makefile (LCLHDRS): Likewise. * ufs/Makefile (LCLHDRS): Likewise. * usermux/Makefile (LCLHDRS): Likewise. * utils/Makefile (LCLHDRS): Likewise.
* Fix extern inline useSamuel Thibault2012-03-253-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext2fs/Makefile (SRCS): Add xinl.c * libtreefs/Makefile (OTHERSRCS): Likewise. * term/Makefile (SRCS): Likewise. * ufs/Makefile (SRCS): Likewise. * hostmux/hostmux-xinl.c: Define HOSTMUX_DEFINE_EI instead of HOSTMUX_EI. * libdiskfs/extern-inline.c: Define DISKFS_DEFINE_EXTERN_INLINE instead of DISKFS_EXTERN_INLINE. * libftpconn/xinl.c: Define FTP_CONN_DEFINE_EI instead of FTP_CONN_EI. * libpipe/pipe-funcs.c: Define PIPE_DEFINE_EI instead of PIPE_EI. * libpipe/pq-funcs.c: Define PQ_DEFINE_EI instead of PQ_EI. * libshouldbeinlibc/idvec-funcs.c: Define IDVEC_DEFINE_EI instead of IDVEC_EI. * libshouldbeinlibc/maptime-funcs.c: Define MAPTIME_DEFINE_EI instead of MAPTIME_EI. * libshouldbeinlibc/ugids-xinl.c: Define UGIDS_DEFINE_EI instead of UGIDS_EI. * libstore/xinl.c: Define STORE_DEFINE_EI instead of STORE_EI. * libthreads/rwlock.c: Define RWLOCK_DEFINE_EI instead of RWLOCK_EI. * ext2fs/xinl.c: New file, define EXT2FS_DEFINE_EI and include "ext2fs.h" * libtreefs/xinl.c: New file, define TREEFS_DEFINE_EI and include "treefs.h" and "mig-decls.h". * term/xinl.c: New file, define TERM_DEFINE_EI and include "term.h". * ufs/xinl.c: New file, define UFS_DEFINE_EI and include "ufs.h" * ext2fs/ext2fs.h: Include <features.h>, define EXT2FS_EI to __extern_inline instead of "extern inline", define it to empty when EXT2FS_DEFINE_EI is defined. Always declare extern inline prototypes, and define extern inlines content only if __USE_EXTERN_INLINES or EXT2FS_DEFINE_EI is defined. * libdiskfs/diskfs.h: Likewise with DISKFS_EXTERN_INLINE and DISKFS_DEFINE_EXTERN_INLINE. * libftpconn/ftpconn.h: Likewise with FTP_CONN_EI and FTP_CONN_DEFINE_EI. * libftpconn/priv.h: Likewise. * libpipe/pipe.h: Likewise with PIPE_EI and PIPE_DEFINE_EI. * libpipe/pq.h: Likewise with PQ_EI and PQ_DEFINE_EI. * libshouldbeinlibc/idvec.h: Likewise with IDVEC_EI and IDVEC_DEFINE_EI. * libshouldbeinlibc/maptime.h: Likewise with MAPTIME_EI and MAPTIME_DEFINE_EI. * libshouldbeinlibc/ugids.h: Likewise with UGIDS_EI and UGIDS_DEFINE_EI. * libstore/store.h: Likewise with STORE_EI and STORE_DEFINE_EI. * libthreads/rwlock.h: Likewise with RWLOCK_EI and RWLOCK_DEFINE_EI. * term/term.h: Likewise with TERM_EI and TERM_DEFINE_EI. * ufs/ufs.h: Likewise with UFS_EI and UFS_DEFINE_EI. * libtreefs/treefs.h: Include <features.h>, define TREE_FS_EI to __extern_inline, or to empty when TREEFS_DEFINE_EI is defined. Use TREEFS_EI instead of "extern inline". * libtreefs/mig-decls.h: Use TREEFS_EI instead of "extern inline".
* fix common misspellingsJonathan Neuschäfer2011-08-204-5/+5
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* Switch to the new ChangeLog style.Thomas Schwinge2009-07-111-296/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Wipe out content, and add instructions about how to get it back. * auth/ChangeLog: Remove file. * benchmarks/ChangeLog: Likewise. * boot/ChangeLog: Likewise. * bsdfsck/ChangeLog: Likewise. * config/ChangeLog: Likewise. * console-client/ChangeLog: Likewise. * console/ChangeLog: Likewise. * daemons/ChangeLog: Likewise. * defpager/ChangeLog: Likewise. * doc/ChangeLog: Likewise. * exec/ChangeLog: Likewise. * ext2fs/ChangeLog: Likewise. * fatfs/ChangeLog: Likewise. * fstests/ChangeLog: Likewise. * ftpfs/ChangeLog: Likewise. * hostmux/ChangeLog: Likewise. * hurd/ChangeLog: Likewise. * include/ChangeLog: Likewise. * init/ChangeLog: Likewise. * isofs/ChangeLog: Likewise. * libcons/ChangeLog: Likewise. * libdirmgt/ChangeLog: Likewise. * libdiskfs/ChangeLog: Likewise. * libfshelp/ChangeLog: Likewise. * libftpconn/ChangeLog: Likewise. * libhurdbugaddr/ChangeLog: Likewise. * libihash/ChangeLog: Likewise. * libiohelp/ChangeLog: Likewise. * libnetfs/ChangeLog: Likewise. * libpager/ChangeLog: Likewise. * libpipe/ChangeLog: Likewise. * libports/ChangeLog: Likewise. * libps/ChangeLog: Likewise. * libshouldbeinlibc/ChangeLog: Likewise. * libstore/ChangeLog: Likewise. * libthreads/ChangeLog: Likewise. * libtrivfs/ChangeLog: Likewise. * login/ChangeLog: Likewise. * mach-defpager/ChangeLog: Likewise. * nfs/ChangeLog: Likewise. * nfsd/ChangeLog: Likewise. * pfinet/ChangeLog: Likewise. * pflocal/ChangeLog: Likewise. * proc/ChangeLog: Likewise. * release/ChangeLog: Likewise. * serverboot/ChangeLog: Likewise. * storeio/ChangeLog: Likewise. * sutils/ChangeLog: Likewise. * term/ChangeLog: Likewise. * tmpfs/ChangeLog: Likewise. * trans/ChangeLog: Likewise. * ufs-fsck/ChangeLog: Likewise. * ufs-utils/ChangeLog: Likewise. * ufs/ChangeLog: Likewise. * usermux/ChangeLog: Likewise. * utils/ChangeLog: Likewise.
* [ftpfs]Samuel Thibault2009-02-022-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * dir.c (ftpfs_refresh_node): Use st_mtim.tv_sec members instead of st_mtime. Also compare st_mtim.tv_nsec members. [libdiskfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * file-utimes.c (diskfs_S_file_utimes): Use st_atim.tv_sec/ st_mtim.tv_sec members instead of st_atime/st_mtime. Also set st_atim.tv_nsec/st_mtim.tv_nsec members. [libftpconn] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime. Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0. [login] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * utmp.c (S_login_get_idle_time): Use st_atim.tv_sec and st_atim.tv_nsec members instead of st_atime and st_atime_usec. [tmpfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * tmpfs.h (struct disknode): Make atime, mtime and ctime members struct timespec instead of time_t. * tmpfs.c (main): Copy st_atim/st_mtim/st_ctim members from st to diskfs_root_node->dn_stat instead of st_atime/st_mtime/st_ctime. * node.c (diskfs_node_norefs): Copy st_atime/st_mtime/st_ctime members from np->dn_stat to atime/mtime/ctime members of np->dn (diskfs_cached_lookup): Conversely.
* .Roland McGrath2002-10-191-0/+5
|
* 2002-10-19 Roland McGrath <roland@frob.com>Roland McGrath2002-10-191-5/+4
| | | | | * unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME instead of the original pointer.
* .Roland McGrath2002-06-111-0/+5
|
* 2002-06-08 Roland McGrath <roland@frob.com>Roland McGrath2002-06-111-1/+5
| | | | | * ftpconn.h (ftp_conn_add_stat_fun_t) [_FILE_OFFSET_BITS != 64]: Use struct stat64 in place of struct stat.
* .Roland McGrath2002-05-081-0/+5
|
* 2002-05-07 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-5/+4
| | | | | * xfer.c (ftp_conn_start_open_actv_data): size_t -> socklen_t (ftp_conn_finish_open_actv_data): Likewise.
* Fix grammatical error, argh!Marcus Brinkmann2002-04-201-1/+1
|
* ftpfs/Marcus Brinkmann2002-04-202-29/+99
| | | | | | | | | | | | | | | | | | | | | | 2002-04-13 Moritz Schulte <moritz@chaosdorf.de> * ftpfs.c: Include <sys/stat.h> (main): Stat the underlying node and initialize the root node's stat information. * dir.c (ftpfs_refresh_node): If refreshing the root node, simply use the old stat information. libftpconn/ 2002-04-13 Moritz Schulte <moritz@chaosdorf.de> * unix.c: Include <libgen.h>. (struct get_stats_state): New member: searched_name. (ftp_conn_unix_start_get_stats): Return EINVAL if trying to list the root node without listing it's content; set searched_name to the dirname. (ftp_conn_unix_cont_get_stats): If searching for the list info of one entry, skip all other entries.
* .Roland McGrath2001-12-221-0/+5
|
* 2001-12-22 Roland McGrath <roland@frob.com>Roland McGrath2001-12-221-6/+4
| | | | | * ftpconn.h (ftp_conn_validate_syshooks): Don't make this extern inline defn conditional on [__OPTIMIZE__].
* *** empty log message ***Thomas Bushnell1999-08-111-1/+1
|
* 1999-08-11 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-08-112-1/+8
| | | | | | * open.c (ftp_conn_open): Ignore error from ftp_conn_sysify; it's ok if we can't successfully deal. If we didn't sysify successfully before login, then try again afterwards.
* 1999-08-11 Thomas Bushnell, BSG <tb@mit.edu>Thomas Bushnell1999-08-112-3/+8
| | | | * open.c (ftp_conn_sysify): Handle REPLY_NO_LOGIN from "syst".
* Add braces to silence gcc warnings.Roland McGrath1998-10-206-113/+149
|
* .Miles Bader1997-09-041-0/+4
|
* [!FTP_CONN_EI] (FTP_CONN_EI):Miles Bader1997-09-041-1/+7
| | | | | | | New macro. (ftp_conn_validate_syshooks): Use FTP_CONN_EI instead of `static inline'. Protect with __OPTIMIZE__.
* (ftp_conn_close):Miles Bader1997-09-041-3/+0
| | | | Don't cleanup CONN->actv_data_conn_queue.
* (ftp_conn_create):Miles Bader1997-09-041-1/+0
| | | | Don't initialize CONN->actv_data_conn_queue.
* .Miles Bader1997-09-041-0/+11
|
* (struct ftp_conn):Miles Bader1997-09-041-2/+0
| | | | Remove ACTV_DATA_CONN_QUEUE field.
* (ftp_conn_abort_open_actv_data):Miles Bader1997-09-041-67/+72
| | | | | | | | | Close the data queue socket. (ftp_conn_finish_open_actv_data): Close the listen queue after looking for a connection. (ftp_conn_start_open_actv_data): Always generate a new data connection (it doesn't work to always listen on a single address).
* .Miles Bader1997-09-021-0/+31
|
* (struct ftp_conn):Miles Bader1997-09-021-1/+7
| | | | | Add the ACTV_DATA_ADDR and ACTV_DATA_CONN_QUEUE fields. Add USE_PASSIVE field.
* (ftp_conn_close):Miles Bader1997-09-021-1/+4
| | | | | | Close CONN->actv_data_conn_queue if necessary. (ftp_conn_open): Set SIN_LEN field correctly.
* (ftp_conn_free):Miles Bader1997-09-021-0/+5
| | | | | | | Free the ACTV_DATA_ADDR field. (ftp_conn_create): Initialiaze the ACTV_DATA_ADDR & ACTV_DATA_CONN_QUEUE fields. Initialize USE_PASSIVE field.
* (ftp_conn_finish_open_data,Miles Bader1997-09-021-15/+161
| | | | | | | | | | | ftp_conn_start_open_actv_data, ftp_conn_finish_open_actv_data): New functions. (ftp_conn_start_open_data): Renamed from ftp_conn_open_data. Use an active data connection if passive doesn't work. (ftp_conn_start_transfer): Use ftp_conn_start_open_data and ftp_conn_finish_open_data instead of ftp_conn_open_data.
* .Miles Bader1997-08-191-0/+4
|
* (ftp_conn_create):Miles Bader1997-08-191-0/+1
| | | | Initialize the SYSHOOKS_VALID field.
* .Miles Bader1997-08-181-0/+11
|
* (ftp_conn_set_type):Miles Bader1997-08-181-10/+11
| | | | | If there's no connection, don't open a new one, just save the type for later.
* (ftp_conn_sysify):Miles Bader1997-08-181-0/+1
| | | | Set SYSHOOKS_VALID.
* (struct ftp_conn):Miles Bader1997-08-181-0/+13
| | | | | | Add SYSHOOKS_VALID field. (ftp_conn_validate_syshooks): New inline function.
* (ftp_conn_append_name, ftp_conn_basename):Miles Bader1997-08-181-2/+9
| | | | Make sure CONN's SYSHOOKS field is valid before using it.
* .Miles Bader1997-08-091-0/+7
|
* (ftp_conn_unix_cont_get_stats):Miles Bader1997-08-091-0/+7
| | | | Check for interrupts.
* (ftp_conn_getline):Miles Bader1997-08-091-0/+4
| | | | Check for interrupts.
* (ftp_conn_cont_get_names):Miles Bader1997-08-091-0/+7
| | | | Check for interrupts.
* (struct ftp_conn_hooks):Miles Bader1997-08-091-0/+5
| | | | Add INTERRUPT_CHECK field.
* .Miles Bader1997-08-081-0/+27
|