Patchwork [3/3] slirp: remove unused function u_sleep

login
register
mail settings
Submitter Blue Swirl
Date Oct. 28, 2012, 12:26 p.m.
Message ID <20646c072ced410321c404397f1ff8afb8051930.1351427134.git.blauwirbel@gmail.com>
Download mbox | patch
Permalink /patch/194697/
State New
Headers show

Comments

Blue Swirl - Oct. 28, 2012, 12:26 p.m.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 slirp/misc.c |   14 --------------
 slirp/misc.h |    1 -
 2 files changed, 0 insertions(+), 15 deletions(-)
Jan Kiszka - Oct. 30, 2012, 8:31 a.m.
On 2012-10-28 13:26, Blue Swirl wrote:
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
>  slirp/misc.c |   14 --------------
>  slirp/misc.h |    1 -
>  2 files changed, 0 insertions(+), 15 deletions(-)
> 
> diff --git a/slirp/misc.c b/slirp/misc.c
> index 0bee864..664532a 100644
> --- a/slirp/misc.c
> +++ b/slirp/misc.c
> @@ -253,20 +253,6 @@ void lprint(const char *format, ...)
>      va_end(args);
>  }
>  
> -void
> -u_sleep(int usec)
> -{
> -	struct timeval t;
> -	fd_set fdset;
> -
> -	FD_ZERO(&fdset);
> -
> -	t.tv_sec = 0;
> -	t.tv_usec = usec * 1000;
> -
> -	select(0, &fdset, &fdset, &fdset, &t);
> -}
> -
>  void slirp_connection_info(Slirp *slirp, Monitor *mon)
>  {
>      const char * const tcpstates[] = {
> diff --git a/slirp/misc.h b/slirp/misc.h
> index ed40a10..cc36aeb 100644
> --- a/slirp/misc.h
> +++ b/slirp/misc.h
> @@ -64,7 +64,6 @@ void snooze_hup(int);
>  void snooze(void);
>  void relay(int);
>  void add_emu(char *);
> -void u_sleep(int);
>  void fd_nonblock(int);
>  void fd_block(int);
>  int rsh_exec(struct socket *, struct socket *, char *, char *, char *);
> 

It's obviously fine. But wasn't it already merged or accepted for
trivial? Of course, I can take it otherwise.

Jan
Blue Swirl - Oct. 30, 2012, 7:03 p.m.
On Tue, Oct 30, 2012 at 8:31 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2012-10-28 13:26, Blue Swirl wrote:
>> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
>> ---
>>  slirp/misc.c |   14 --------------
>>  slirp/misc.h |    1 -
>>  2 files changed, 0 insertions(+), 15 deletions(-)
>>
>> diff --git a/slirp/misc.c b/slirp/misc.c
>> index 0bee864..664532a 100644
>> --- a/slirp/misc.c
>> +++ b/slirp/misc.c
>> @@ -253,20 +253,6 @@ void lprint(const char *format, ...)
>>      va_end(args);
>>  }
>>
>> -void
>> -u_sleep(int usec)
>> -{
>> -     struct timeval t;
>> -     fd_set fdset;
>> -
>> -     FD_ZERO(&fdset);
>> -
>> -     t.tv_sec = 0;
>> -     t.tv_usec = usec * 1000;
>> -
>> -     select(0, &fdset, &fdset, &fdset, &t);
>> -}
>> -
>>  void slirp_connection_info(Slirp *slirp, Monitor *mon)
>>  {
>>      const char * const tcpstates[] = {
>> diff --git a/slirp/misc.h b/slirp/misc.h
>> index ed40a10..cc36aeb 100644
>> --- a/slirp/misc.h
>> +++ b/slirp/misc.h
>> @@ -64,7 +64,6 @@ void snooze_hup(int);
>>  void snooze(void);
>>  void relay(int);
>>  void add_emu(char *);
>> -void u_sleep(int);
>>  void fd_nonblock(int);
>>  void fd_block(int);
>>  int rsh_exec(struct socket *, struct socket *, char *, char *, char *);
>>
>
> It's obviously fine. But wasn't it already merged or accepted for
> trivial? Of course, I can take it otherwise.

I split the function removals from the rest of the series because of
API considerations, these are not entirely trivial.

>
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RTC ITP SDP-DE
> Corporate Competence Center Embedded Linux

Patch

diff --git a/slirp/misc.c b/slirp/misc.c
index 0bee864..664532a 100644
--- a/slirp/misc.c
+++ b/slirp/misc.c
@@ -253,20 +253,6 @@  void lprint(const char *format, ...)
     va_end(args);
 }
 
-void
-u_sleep(int usec)
-{
-	struct timeval t;
-	fd_set fdset;
-
-	FD_ZERO(&fdset);
-
-	t.tv_sec = 0;
-	t.tv_usec = usec * 1000;
-
-	select(0, &fdset, &fdset, &fdset, &t);
-}
-
 void slirp_connection_info(Slirp *slirp, Monitor *mon)
 {
     const char * const tcpstates[] = {
diff --git a/slirp/misc.h b/slirp/misc.h
index ed40a10..cc36aeb 100644
--- a/slirp/misc.h
+++ b/slirp/misc.h
@@ -64,7 +64,6 @@  void snooze_hup(int);
 void snooze(void);
 void relay(int);
 void add_emu(char *);
-void u_sleep(int);
 void fd_nonblock(int);
 void fd_block(int);
 int rsh_exec(struct socket *, struct socket *, char *, char *, char *);