mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 17:48:54 +08:00
net/procfs/netdev_statistics.c: Appease nxstyle
This commit is contained in:
committed by
Xiang Xiao
parent
45a51bf4b0
commit
ba34213222
@@ -72,11 +72,13 @@ static int netprocfs_inet6draddress(FAR struct netprocfs_file_s *netfile);
|
|||||||
static int netprocfs_blank_line(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_blank_line(FAR struct netprocfs_file_s *netfile);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_NETDEV_STATISTICS
|
#ifdef CONFIG_NETDEV_STATISTICS
|
||||||
static int netprocfs_rxstatistics_header(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_rxstatistics_header(
|
||||||
|
FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_rxstatistics(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_rxstatistics(FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_rxpackets_header(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_rxpackets_header(FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_rxpackets(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_rxpackets(FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_txstatistics_header(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_txstatistics_header(
|
||||||
|
FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_txstatistics(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_txstatistics(FAR struct netprocfs_file_s *netfile);
|
||||||
static int netprocfs_errors(FAR struct netprocfs_file_s *netfile);
|
static int netprocfs_errors(FAR struct netprocfs_file_s *netfile);
|
||||||
#endif /* CONFIG_NETDEV_STATISTICS */
|
#endif /* CONFIG_NETDEV_STATISTICS */
|
||||||
@@ -380,7 +382,8 @@ static int netprocfs_blank_line(FAR struct netprocfs_file_s *netfile)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_STATISTICS
|
#ifdef CONFIG_NETDEV_STATISTICS
|
||||||
static int netprocfs_rxstatistics_header(FAR struct netprocfs_file_s *netfile)
|
static int netprocfs_rxstatistics_header(
|
||||||
|
FAR struct netprocfs_file_s *netfile)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(netfile != NULL);
|
DEBUGASSERT(netfile != NULL);
|
||||||
return snprintf(netfile->line, NET_LINELEN , "\tRX: %-8s %-8s %-8s\n",
|
return snprintf(netfile->line, NET_LINELEN , "\tRX: %-8s %-8s %-8s\n",
|
||||||
@@ -492,7 +495,8 @@ static int netprocfs_rxpackets(FAR struct netprocfs_file_s *netfile)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_NETDEV_STATISTICS
|
#ifdef CONFIG_NETDEV_STATISTICS
|
||||||
static int netprocfs_txstatistics_header(FAR struct netprocfs_file_s *netfile)
|
static int netprocfs_txstatistics_header(
|
||||||
|
FAR struct netprocfs_file_s *netfile)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(netfile != NULL);
|
DEBUGASSERT(netfile != NULL);
|
||||||
|
|
||||||
@@ -515,7 +519,8 @@ static int netprocfs_txstatistics(FAR struct netprocfs_file_s *netfile)
|
|||||||
dev = netfile->dev;
|
dev = netfile->dev;
|
||||||
stats = &dev->d_statistics;
|
stats = &dev->d_statistics;
|
||||||
|
|
||||||
return snprintf(netfile->line, NET_LINELEN, "\t %08lx %08lx %08lx %08lx\n",
|
return snprintf(netfile->line, NET_LINELEN,
|
||||||
|
"\t %08lx %08lx %08lx %08lx\n",
|
||||||
(unsigned long)stats->tx_packets,
|
(unsigned long)stats->tx_packets,
|
||||||
(unsigned long)stats->tx_done,
|
(unsigned long)stats->tx_done,
|
||||||
(unsigned long)stats->tx_errors,
|
(unsigned long)stats->tx_errors,
|
||||||
|
|||||||
Reference in New Issue
Block a user