- Consequently use "unsigned int", not "unsigned"
- Indent
- Sort headers
This commit is contained in:
Kim Woelders
2018-06-28 11:58:28 +02:00
parent ac76071e0e
commit 8956f3f851
2 changed files with 25 additions and 25 deletions
+22 -22
View File
@@ -5,28 +5,27 @@
#include "config.h"
#include <cuse_lowlevel.h>
#include <errno.h>
#include <fcntl.h>
#include <fuse_opt.h>
#include <netdb.h>
#include <pthread.h>
#include <signal.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <syslog.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
#include <linux/sockios.h>
#include <netinet/in.h>
#include <netdb.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <pthread.h>
#include <sys/poll.h>
#include <signal.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <time.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/types.h>
#include "telnet.h"
@@ -128,7 +127,7 @@ static void ttynvt_update_notify(ttynvt_t * tty, struct fuse_pollhandle *ph)
fuse_pollhandle_destroy(tmp_ph);
}
static unsigned ttynvt_write_avail(ttynvt_t * tty)
static unsigned int ttynvt_write_avail(ttynvt_t * tty)
{
size_t write_avail;
int used;
@@ -250,7 +249,7 @@ static int ttynvt_connect(const char *host, unsigned int port)
(sockfd, (const struct sockaddr *)&serveraddr, sizeof(serveraddr)) < 0)
{
ttynvt_log("ERROR: failed to connect to: %s:%u:%s\n",
host, port, strerror(errno));
host, port, strerror(errno));
return -1;
}
return sockfd;
@@ -484,7 +483,7 @@ static const char pstr[] = { ' ', 'N', 'O', 'E', 'M', 'S' };
static void
ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
struct fuse_file_info *info, unsigned flags,
struct fuse_file_info *info, unsigned int flags,
const void *in_buf, size_t in_bufsz, size_t out_bufsz)
{
ttynvt_t *tty = (ttynvt_t *) (uintptr_t) info->fh;
@@ -558,7 +557,8 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
telnet_rfc2217_ctl(tty->tn, TNS_CTL_DTR_ON);
}
ttynvt_log("CFG ioctl: %u%c%u%u %cCTSRTS %cCREAD %cHUPCL %cCLOCAL\n",
ttynvt_log
("CFG ioctl: %u%c%u%u %cCTSRTS %cCREAD %cHUPCL %cCLOCAL\n",
baudrate(speed), pstr[par], csize, sb,
tio.c_cflag & CRTSCTS ? '+' : '-',
tio.c_cflag & CREAD ? '+' : '-',
@@ -777,12 +777,12 @@ static const struct cuse_lowlevel_ops ttynvt_op = {
#define TTYNET_OPT(t, p, v) { t, offsetof(struct ttynvt_param, p), v }
struct ttynvt_param {
unsigned major;
unsigned minor;
unsigned int major;
unsigned int minor;
char *dev_name;
char *logfile;
char *host;
unsigned port;
unsigned int port;
};
static const struct fuse_opt ttynvt_opts[] = {