mirror of
https://repo.or.cz/socat.git
synced 2025-07-12 14:43:24 +00:00
On bad parameter number print syntax; struct single pointers are now mostly called sfd
This commit is contained in:
parent
5eebca3a5b
commit
50b199dcd9
42 changed files with 1354 additions and 1163 deletions
16
xio-creat.c
16
xio-creat.c
|
@ -13,7 +13,7 @@
|
|||
#include "xio-creat.h"
|
||||
|
||||
|
||||
static int xioopen_creat(int arg, const char *argv[], struct opt *opts, int rw, xiofile_t *fd, groups_t groups, int dummy1, int dummy2, int dummy3);
|
||||
static int xioopen_creat(int arg, const char *argv[], struct opt *opts, int rw, xiofile_t *fd, const struct addrdesc *addrdesc);
|
||||
|
||||
|
||||
/*! within stream model, this is a write-only address - use 2 instead of 3 */
|
||||
|
@ -37,7 +37,14 @@ static int _xioopen_creat(const char *path, int rw, struct opt *opts) {
|
|||
}
|
||||
|
||||
|
||||
static int xioopen_creat(int argc, const char *argv[], struct opt *opts, int xioflags, xiofile_t *xxfd, groups_t groups, int dummy1, int dummy2, int dummy3) {
|
||||
static int xioopen_creat(
|
||||
int argc,
|
||||
const char *argv[],
|
||||
struct opt *opts,
|
||||
int xioflags,
|
||||
xiofile_t *xxfd,
|
||||
const struct addrdesc *addrdesc)
|
||||
{
|
||||
struct single *sfd = &xxfd->stream;
|
||||
const char *filename = argv[1];
|
||||
int rw = (xioflags&XIO_ACCMODE);
|
||||
|
@ -46,7 +53,10 @@ static int xioopen_creat(int argc, const char *argv[], struct opt *opts, int xio
|
|||
int result;
|
||||
|
||||
/* remove old file, or set user/permissions on old file; parse options */
|
||||
if ((result = _xioopen_named_early(argc, argv, xxfd, groups, &exists, opts)) < 0) {
|
||||
if ((result =
|
||||
_xioopen_named_early(argc, argv, xxfd, addrdesc->groups, &exists, opts,
|
||||
addrdesc->syntax))
|
||||
< 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue