All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: Format connected time
@ 2014-09-01  8:55 Matteo Croce
  2014-09-03 11:42 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Croce @ 2014-09-01  8:55 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Format connected_time in the form hh:mm:ss

Signed-off-by: Matteo Croce <matteo@openwrt.org>

--- 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] 4+ messages in thread

* Re: [PATCH] mac80211: Format connected time
  2014-09-01  8:55 [PATCH] mac80211: Format connected time Matteo Croce
@ 2014-09-03 11:42 ` Johannes Berg
  2014-09-03 13:33   ` Matteo Croce
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2014-09-03 11:42 UTC (permalink / raw)
  To: Matteo Croce; +Cc: linux-wireless

This seems like a good enough change, but the subject is misleading - it
was formatted before, just not in a nice way :)

Also, your patch doesn't apply (otherwise I would've fixed it up myself)

johannes



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

* Re: [PATCH] mac80211: Format connected time
  2014-09-03 11:42 ` Johannes Berg
@ 2014-09-03 13:33   ` Matteo Croce
  2014-09-03 17:57     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Matteo Croce @ 2014-09-03 13:33 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

Sorry, gmail wrapped the line with the C function.
Here is a fixed patch

Format connected_time in the form hh:mm:ss

Signed-off-by: Matteo Croce <matteo@openwrt.org>

--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -130,7 +130,7 @@
  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] 4+ messages in thread

* Re: [PATCH] mac80211: Format connected time
  2014-09-03 13:33   ` Matteo Croce
@ 2014-09-03 17:57     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2014-09-03 17:57 UTC (permalink / raw)
  To: Matteo Croce; +Cc: linux-wireless

On Wed, 2014-09-03 at 15:33 +0200, Matteo Croce wrote:
> Sorry, gmail wrapped the line with the C function.
> Here is a fixed patch

Nope, didn't work either :)

I think I'll just commit the fix myself ...

johannes


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

end of thread, other threads:[~2014-09-03 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01  8:55 [PATCH] mac80211: Format connected time Matteo Croce
2014-09-03 11:42 ` Johannes Berg
2014-09-03 13:33   ` Matteo Croce
2014-09-03 17:57     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.