aboutsummaryrefslogtreecommitdiff
path: root/miscutils/devfsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/devfsd.c')
-rw-r--r--miscutils/devfsd.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index e4d104d0c..f3d935b2e 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -344,14 +344,19 @@ static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found";
344/* Busybox stuff */ 344/* Busybox stuff */
345#if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG 345#if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG
346#define info_logger(p, fmt, args...) bb_info_msg(fmt, ## args) 346#define info_logger(p, fmt, args...) bb_info_msg(fmt, ## args)
347#define simple_info_logger(p, msg) bb_simple_info_msg(msg)
347#define msg_logger(p, fmt, args...) bb_error_msg(fmt, ## args) 348#define msg_logger(p, fmt, args...) bb_error_msg(fmt, ## args)
349#define simple_msg_logger(p, msg) bb_simple_error_msg(msg)
348#define msg_logger_and_die(p, fmt, args...) bb_error_msg_and_die(fmt, ## args) 350#define msg_logger_and_die(p, fmt, args...) bb_error_msg_and_die(fmt, ## args)
351#define simple_msg_logger_and_die(p, msg) bb_simple_error_msg_and_die(msg)
349#define error_logger(p, fmt, args...) bb_perror_msg(fmt, ## args) 352#define error_logger(p, fmt, args...) bb_perror_msg(fmt, ## args)
350#define error_logger_and_die(p, fmt, args...) bb_perror_msg_and_die(fmt, ## args) 353#define error_logger_and_die(p, fmt, args...) bb_perror_msg_and_die(fmt, ## args)
351#else 354#else
352#define info_logger(p, fmt, args...) 355#define info_logger(p, fmt, args...)
353#define msg_logger(p, fmt, args...) 356#define msg_logger(p, fmt, args...)
357#define simple_msg_logger(p, msg)
354#define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) 358#define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE)
359#define simple_msg_logger_and_die(p, msg) exit(EXIT_FAILURE)
355#define error_logger(p, fmt, args...) 360#define error_logger(p, fmt, args...)
356#define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) 361#define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE)
357#endif 362#endif
@@ -727,7 +732,7 @@ static int do_servicing(int fd, unsigned long event_mask)
727 caught_sighup = FALSE; 732 caught_sighup = FALSE;
728 return c_sighup; 733 return c_sighup;
729 } 734 }
730 msg_logger_and_die(LOG_ERR, "read error on control file"); 735 simple_msg_logger_and_die(LOG_ERR, "read error on control file");
731} /* End Function do_servicing */ 736} /* End Function do_servicing */
732 737
733static void service_name(const struct devfsd_notify_struct *info) 738static void service_name(const struct devfsd_notify_struct *info)
@@ -786,7 +791,7 @@ static void service_name(const struct devfsd_notify_struct *info)
786 action_compat(info, entry->action.what); 791 action_compat(info, entry->action.what);
787 break; 792 break;
788 default: 793 default:
789 msg_logger_and_die(LOG_ERR, "Unknown action"); 794 simple_msg_logger_and_die(LOG_ERR, "Unknown action");
790 } 795 }
791 } 796 }
792} /* End Function service_name */ 797} /* End Function service_name */
@@ -1691,7 +1696,7 @@ int st_expr_expand(char *output, unsigned int length, const char *input,
1691 } 1696 }
1692 return FALSE; 1697 return FALSE;
1693st_expr_expand_out: 1698st_expr_expand_out:
1694 info_logger(LOG_INFO, bb_msg_small_buffer); 1699 simple_info_logger(LOG_INFO, bb_msg_small_buffer);
1695 return FALSE; 1700 return FALSE;
1696} /* End Function st_expr_expand */ 1701} /* End Function st_expr_expand */
1697 1702
@@ -1775,7 +1780,7 @@ static const char *expand_variable(char *buffer, unsigned int length,
1775 return input + len; 1780 return input + len;
1776 } 1781 }
1777 if (ch != ':' || ptr[1] != '-') { 1782 if (ch != ':' || ptr[1] != '-') {
1778 info_logger(LOG_INFO, "illegal char in var name"); 1783 simple_info_logger(LOG_INFO, "illegal char in var name");
1779 return NULL; 1784 return NULL;
1780 } 1785 }
1781 /* It's that handy "${var:-word}" expression. Check if var is defined */ 1786 /* It's that handy "${var:-word}" expression. Check if var is defined */
@@ -1838,7 +1843,7 @@ static const char *expand_variable(char *buffer, unsigned int length,
1838 *out_pos += len; 1843 *out_pos += len;
1839 return input; 1844 return input;
1840expand_variable_out: 1845expand_variable_out:
1841 info_logger(LOG_INFO, bb_msg_small_buffer); 1846 simple_info_logger(LOG_INFO, bb_msg_small_buffer);
1842 return NULL; 1847 return NULL;
1843} /* End Function expand_variable */ 1848} /* End Function expand_variable */
1844 1849