linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Format connected time
@ 2014-09-01  8:25 Matteo Croce
  2014-09-01  8:36 ` Arend van Spriel
  0 siblings, 1 reply; 2+ messages in thread
From: Matteo Croce @ 2014-09-01  8:25 UTC (permalink / raw)
  To: linux-wireless

Format connected_time in the form hh:mm:ss

--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -130,7 +130,7 @@ static ssize_t sta_connected_time_read(struct file
*file, char __user *userbuf,
  result.tm_year -= 70;
  result.tm_mday -= 1;
  res = scnprintf(buf, sizeof(buf),
- "years  - %ld\nmonths - %d\ndays   - %d\nclock  - %d:%d:%d\n\n",
+ "years  - %ld\nmonths - %d\ndays   - %d\nclock  - %02d:%02d:%02d\n\n",
  result.tm_year, result.tm_mon, result.tm_mday,
  result.tm_hour, result.tm_min, result.tm_sec);
  return simple_read_from_buffer(userbuf, count, ppos, buf, res);

-- 
Matteo Croce
OpenWrt Developer
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Format connected time
  2014-09-01  8:25 Format connected time Matteo Croce
@ 2014-09-01  8:36 ` Arend van Spriel
  0 siblings, 0 replies; 2+ messages in thread
From: Arend van Spriel @ 2014-09-01  8:36 UTC (permalink / raw)
  To: Matteo Croce; +Cc: linux-wireless

On 09/01/14 10:25, Matteo Croce wrote:
> Format connected_time in the form hh:mm:ss

Hi Matteo,

This is not a proper patch submission. Please read the file 
Documentation/SubmittingPatches. Especially, sections 11) and 12). Also 
would be good to have 'mac80211:' prefix in the subject line and it is 
recommended to submit changes to the maintainer and cc the mailing list.

Hope this helps. No guarantees this change will be applied though.

Regards,
Arend

> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -130,7 +130,7 @@ static ssize_t sta_connected_time_read(struct file
> *file, char __user *userbuf,
>    result.tm_year -= 70;
>    result.tm_mday -= 1;
>    res = scnprintf(buf, sizeof(buf),
> - "years  - %ld\nmonths - %d\ndays   - %d\nclock  - %d:%d:%d\n\n",
> + "years  - %ld\nmonths - %d\ndays   - %d\nclock  - %02d:%02d:%02d\n\n",
>    result.tm_year, result.tm_mon, result.tm_mday,
>    result.tm_hour, result.tm_min, result.tm_sec);
>    return simple_read_from_buffer(userbuf, count, ppos, buf, res);
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-01  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-01  8:25 Format connected time Matteo Croce
2014-09-01  8:36 ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).