Re: [systemd-devel] [PATCH] Cache aggregated cgroup mask data at the slice level.

2013-11-07 Thread David Strauss
I'm specifically wondering if it's safe to use cgroup_mask in slices
to aggregate the masks of their children. If not, it's trivial to add
another item to the struct (like cgroup_mask_children) to use for
aggregation.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH v2 1/2] analyze: split out bus util functions

2013-11-07 Thread Marc-Antoine Perennou
They will soon be used in systemctl
---
 src/analyze/analyze.c | 68 +++
 src/libsystemd-bus/bus-util.c | 49 +++
 src/libsystemd-bus/bus-util.h | 17 +++
 3 files changed, 70 insertions(+), 64 deletions(-)

diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index e149b15..19e6508 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -89,19 +89,6 @@ struct boot_times {
 usec_t unitsload_finish_time;
 };
 
-struct unit_info {
-const char *id;
-const char *description;
-const char *load_state;
-const char *active_state;
-const char *sub_state;
-const char *following;
-const char *unit_path;
-uint32_t job_id;
-const char *job_type;
-const char *job_path;
-};
-
 struct unit_times {
 char *name;
 usec_t activating;
@@ -146,31 +133,6 @@ static int bus_get_uint64_property(sd_bus *bus, const char 
*path, const char *in
 return 0;
 }
 
-static int bus_get_unit_property_strv(sd_bus *bus, const char *path, const 
char *property, char ***strv) {
-_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
-int r;
-
-assert(bus);
-assert(path);
-assert(property);
-assert(strv);
-
-r = sd_bus_get_property_strv(
-bus,
-"org.freedesktop.systemd1",
-path,
-"org.freedesktop.systemd1.Unit",
-property,
-&error,
-strv);
-if (r < 0) {
-log_error("Failed to get unit property %s: %s", property, 
bus_error_message(&error, -r));
-return r;
-}
-
-return 0;
-}
-
 static int compare_unit_time(const void *a, const void *b) {
 return compare(((struct unit_times *)b)->time,
((struct unit_times *)a)->time);
@@ -205,34 +167,12 @@ static void free_unit_times(struct unit_times *t, 
unsigned n) {
 free(t);
 }
 
-static int bus_parse_unit_info(sd_bus_message *message, struct unit_info *u) {
-int r = 0;
-
-assert(message);
-assert(u);
-
-r = sd_bus_message_read(message, "(ssouso)", &u->id,
- &u->description,
- &u->load_state,
- &u->active_state,
- &u->sub_state,
- &u->following,
- &u->unit_path,
- &u->job_id,
- &u->job_type,
- &u->job_path);
-if (r < 0)
-return bus_log_parse_error(r);
-
-return r;
-}
-
 static int acquire_time_data(sd_bus *bus, struct unit_times **out) {
 _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
 int r, c = 0, n_units = 0;
 struct unit_times *unit_times = NULL;
-struct unit_info u;
+struct unit_info u = {};
 
 r = sd_bus_call_method(
 bus,
@@ -253,7 +193,7 @@ static int acquire_time_data(sd_bus *bus, struct unit_times 
**out) {
 goto fail;
 }
 
-while ((r = bus_parse_unit_info(reply, &u)) > 0) {
+while ((r = bus_message_read_unit_info(reply, &u)) > 0) {
 struct unit_times *t;
 
 if (r < 0)
@@ -1027,8 +967,8 @@ static int graph_one(sd_bus *bus, const struct unit_info 
*u, char *patterns[]) {
 static int dot(sd_bus *bus, char* patterns[]) {
 _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
 _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+struct unit_info u = {};
 int r;
-struct unit_info u;
 
 r = sd_bus_call_method(
 bus,
@@ -1050,7 +990,7 @@ static int dot(sd_bus *bus, char* patterns[]) {
 
 printf("digraph systemd {\n");
 
-while ((r = bus_parse_unit_info(reply, &u)) > 0) {
+while ((r = bus_message_read_unit_info(reply, &u)) > 0) {
 r = graph_one(bus, &u, patterns);
 if (r < 0)
 return r;
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index ae9733d..3959972 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -958,3 +958,52 @@ int bus_log_parse_error(int r) {
 log_error("Failed to parse message: %s", strerror(-r));
 return r;
 }
+
+int bus_get_unit_property_str

Re: [systemd-devel] [PATCH] systemctl: provide better error message when start limit is exceeded.

2013-11-07 Thread Lennart Poettering
On Thu, 31.10.13 15:12, Vaclav Pavlin (vpav...@redhat.com) wrote:

> From: Václav Pavlín 

I like the idea, but I'd prefer if we wouldn't let the service failure
field spill into the job result. I don't like redundant fields I must
say...

Also, the reason why a job failed is not just interesting for the start
limit stuff, but for other cases too. Hence, I'd much prefer if when we
see a job result of "failed" that we then read the "Result" property
from the service object and show it in a nice explanation string, one of
which the is the start limit thing. Such a change would only require
reading one more prop if we got "failed" as result, and would need
changes on the client side only.

I hope this makes sene? 

> 
> ---
>  src/core/job.c| 12 ++--
>  src/core/job.h|  1 +
>  src/systemctl/systemctl.c |  5 +
>  3 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/src/core/job.c b/src/core/job.c
> index e5dcef7..44b6b23 100644
> --- a/src/core/job.c
> +++ b/src/core/job.c
> @@ -752,6 +752,7 @@ int job_finish_and_invalidate(Job *j, JobResult result, 
> bool recursive) {
>  Unit *other;
>  JobType t;
>  Iterator i;
> +JobResult r = result;
>  
>  assert(j);
>  assert(j->installed);
> @@ -760,7 +761,13 @@ int job_finish_and_invalidate(Job *j, JobResult result, 
> bool recursive) {
>  u = j->unit;
>  t = j->type;
>  
> -j->result = result;
> +if (result == JOB_FAILED && u->type == UNIT_SERVICE) {
> +Service *s = SERVICE(u);
> +if (s->result == SERVICE_FAILURE_START_LIMIT)
> +r = JOB_FAILED_LIMIT;
> +}
> +
> +j->result = r;
>  
>  if (j->state == JOB_RUNNING)
>  j->manager->n_running_jobs--;
> @@ -1140,7 +1147,8 @@ static const char* const 
> job_result_table[_JOB_RESULT_MAX] = {
>  [JOB_TIMEOUT] = "timeout",
>  [JOB_FAILED] = "failed",
>  [JOB_DEPENDENCY] = "dependency",
> -[JOB_SKIPPED] = "skipped"
> +[JOB_SKIPPED] = "skipped",
> +[JOB_FAILED_LIMIT] = "failed-limit"
>  };
>  
>  DEFINE_STRING_TABLE_LOOKUP(job_result, JobResult);
> diff --git a/src/core/job.h b/src/core/job.h
> index d90bc96..a41bfd9 100644
> --- a/src/core/job.h
> +++ b/src/core/job.h
> @@ -98,6 +98,7 @@ enum JobResult {
>  JOB_FAILED,  /* Job failed */
>  JOB_DEPENDENCY,  /* A required dependency job did not result 
> in JOB_DONE */
>  JOB_SKIPPED, /* JOB_RELOAD of inactive unit; negative 
> result of JOB_VERIFY_ACTIVE */
> +JOB_FAILED_LIMIT,/* Service start limit exceeded */
>  _JOB_RESULT_MAX,
>  _JOB_RESULT_INVALID = -1
>  };
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index d458c65..67c25c8 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -1602,6 +1602,11 @@ static int wait_for_jobs(DBusConnection *bus, Set *s) {
>  log_error("Job for %s canceled.", 
> strna(d.name));
>  else if (streq(d.result, "dependency"))
>  log_error("A dependency job for %s failed. 
> See 'journalctl -xn' for details.", strna(d.name));
> +else if (streq(d.result, "failed-limit"))
> +log_error("Starting %s has been attempted 
> too often too quickly,"
> +  " the repeated start of the unit 
> has been refused. To force a start please"
> +  " invoke 'systemctl reset-failed 
> %s' followed by 'systemctl"
> +  " start %s' again.", 
> strna(d.name), strna(d.name), strna(d.name));
>  else if (!streq(d.result, "done") && 
> !streq(d.result, "skipped"))
>  log_error("Job for %s failed. See 'systemctl 
> status %s' and 'journalctl -xn' for details.", strna(d.name), strna(d.name));
>  }


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 3/3] systemctl: return r instead of always returning 0

2013-11-07 Thread Lennart Poettering
On Wed, 06.11.13 11:18, Michal Sekletar (msekl...@redhat.com) wrote:

Thanks! Applied!

> ---
>  src/systemctl/systemctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index 9f5e273..0c1588c 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -1362,7 +1362,7 @@ static int list_jobs(DBusConnection *bus, char **args) {
>  }
>  free(jobs);
>  
> -return 0;
> +return r;
>  }
>  
>  static int cancel_job(DBusConnection *bus, char **args) {


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] zsh-completion: Move output modes to autoload

2013-11-07 Thread William Giokas
---
Added on to the previous patch.

 shell-completion/zsh/_journalctl | 8 +---
 shell-completion/zsh/_sd_outputmodes | 5 +
 shell-completion/zsh/_systemctl  | 8 +---
 3 files changed, 7 insertions(+), 14 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_outputmodes

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 29ff3e3..d94c1e4 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -1,11 +1,5 @@
 #compdef journalctl
 
-_outputmodes() {
-local -a _output_opts
-_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
-_describe -t output 'output mode' _output_opts || compadd "$@"
-}
-
 _list_fields() {
 local -a journal_fields
 journal_fields=(MESSAGE{,_ID} PRIORITY CODE_{FILE,LINE,FUNC}
@@ -65,7 +59,7 @@ _arguments -s \
 {-n+,--lines=}'[Number of journal entries to show]:integer' \
 '--no-tail[Show all lines, even in follow mode]' \
 {-r,--reverse}'[Reverse output]' \
-{-o+,--output=}'[Change journal output mode]:output modes:_outputmodes' \
+{-o+,--output=}'[Change journal output mode]:output modes:_sd_outputmodes' 
\
 {-x,--catalog}'[Show explanatory texts with each log line]' \
 {-q,--quiet}"[Don't show privilege warning]" \
 {-m,--merge}'[Show entries from all available journals]' \
diff --git a/shell-completion/zsh/_sd_outputmodes 
b/shell-completion/zsh/_sd_outputmodes
new file mode 100644
index 000..dae8a5c
--- /dev/null
+++ b/shell-completion/zsh/_sd_outputmodes
@@ -0,0 +1,5 @@
+#autoload
+
+local -a _output_opts
+_output_opts=(short short-monotonic verbose export json json-pretty json-see 
cat)
+_describe -t output 'output mode' _output_opts || compadd "$@"
diff --git a/shell-completion/zsh/_systemctl b/shell-completion/zsh/_systemctl
index 3959cd5..560a548 100644
--- a/shell-completion/zsh/_systemctl
+++ b/shell-completion/zsh/_systemctl
@@ -288,12 +288,6 @@ _systemctl_caching_policy()
   return 1
 }
 
-_outputmodes() {
-local -a _output_opts
-_output_opts=(short short-monotonic verbose export json json-pretty 
json-see cat)
-_describe -t output 'output mode' _output_opts || compadd "$@"
-}
-
 _unit_states() {
 local -a _states
 _states=(loaded failed active inactive not-found listening running waiting 
plugged mounted exited dead masked)
@@ -341,6 +335,6 @@ _arguments -s \
 {-H+,--host=}'[Show information for remote 
host]:userathost:_sd_hosts_or_user_at_host' \
 {-P,--privileged}'[Acquire privileges before execution]' \
 {-n+,--lines=}'[Journal entries to show]:number of entries' \
-{-o+,--output=}'[Change journal output mode]:modes:_outputmodes' \
+{-o+,--output=}'[Change journal output mode]:modes:_sd_outputmodes' \
 '--plain[When used with list-dependencies, print output as a list]' \
 '*::systemctl command:_systemctl_command'
-- 
1.8.5.rc0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 1/2] zsh-completion: Move machine listing to autoload

2013-11-07 Thread William Giokas
Instead of having two different listings of machines, use an autoloaded
function that can be used by other shell completions in the future. It
will also allow editing a single file to change the way machinectl and
systemd-run completion for machines.
---
No changes, just resent to add on to the previous patch.

There may be more eventually, though.

 shell-completion/zsh/_machinectl  |  7 +--
 shell-completion/zsh/_sd_machines | 13 +
 shell-completion/zsh/_systemd-run | 17 +
 3 files changed, 15 insertions(+), 22 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_machines

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index 2e5e05c..026d74f 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -19,12 +19,7 @@
   case $cmd in
 list) msg="no options" ;;
 *)
-  _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
-  if [[ -n "$_machines" ]]; then
-_describe 'machines' _machines
-  else
-_message 'no machines'
-  fi
+  _sd_machines
   esac
 else
   _message "no more options"
diff --git a/shell-completion/zsh/_sd_machines 
b/shell-completion/zsh/_sd_machines
new file mode 100644
index 000..1d64d13
--- /dev/null
+++ b/shell-completion/zsh/_sd_machines
@@ -0,0 +1,13 @@
+#autoload
+__get_machines () {
+machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
+}
+
+local -a _machines
+_machines=("${(fo)$(__get_machines)}")
+typeset -U _machines
+if [[ -n "$_machines" ]]; then
+_describe 'machines' _machines
+else
+_message 'no machines'
+fi
diff --git a/shell-completion/zsh/_systemd-run 
b/shell-completion/zsh/_systemd-run
index 4bfbd19..9bb7700 100644
--- a/shell-completion/zsh/_systemd-run
+++ b/shell-completion/zsh/_systemd-run
@@ -18,27 +18,12 @@ __slices () {
 _describe 'slices' _slices
 }
 
-__get_machines () {
-machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
-}
-
-__machines () {
-local -a _machines
-_machines=("${(fo)$(__get_machines)}")
-typeset -U _machines
-if [[ -n "$_machines" ]]; then
-_describe 'machines' _machines
-else
-_message 'no machines'
-fi
-}
-
 _arguments \
 {-h,--help}'[Show help message]' \
 '--version[Show package version]' \
 '--user[Run as user unit]' \
 {-H+,--host=}'[Operate on remote 
host]:[user@]host:_sd_hosts_or_user_at_host' \
-{-M+,--machine=}'[Operate on local container]:machines:__machines' \
+{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
 '--scope[Run this as scope rather than service]' \
 '--unit=[Run under the specified unit name]:unit name' \
 '--description=[Description for unit]:description' \
-- 
1.8.5.rc0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/3] tmpfiles: skip the path entirely if configured as type x

2013-11-07 Thread Lennart Poettering
On Wed, 06.11.13 11:18, Michal Sekletar (msekl...@redhat.com) wrote:

> Type x in tmpfiles configuration accepts shell style globs instead of normal
> paths. If user uses normal path he might expect that the path will be left
> untouched. However this is not the case for directories and content of the
> directory will be cleaned according to the Age parameter, we should rather 
> skip
> the path entirely in such case.

Not sure I follow. dir_cleanup() already skips all items listed in the
glob hashmap anyway, no? What does your patch add on top of that?

> ---
>  src/tmpfiles/tmpfiles.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
> index 8051cb3..e4ee99d 100644
> --- a/src/tmpfiles/tmpfiles.c
> +++ b/src/tmpfiles/tmpfiles.c
> @@ -910,6 +910,7 @@ static int clean_item_instance(Item *i, const char* 
> instance) {
>  bool mountpoint;
>  int r;
>  usec_t cutoff, n;
> +Item *j = NULL;
>  
>  assert(i);
>  
> @@ -946,6 +947,10 @@ static int clean_item_instance(Item *i, const char* 
> instance) {
>  return -errno;
>  }
>  
> +j = hashmap_get(globs, j->path);
> +if (j && j->type == IGNORE_PATH)
> +return 0;
> +
>  mountpoint = s.st_dev != ps.st_dev ||
>   (s.st_dev == ps.st_dev && s.st_ino == ps.st_ino);
>  


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/3] net-util: call ioctl() only if necessary

2013-11-07 Thread Lennart Poettering
On Wed, 06.11.13 11:18, Michal Sekletar (msekl...@redhat.com) wrote:

> In case when update of current values is not necessary we still might end up
> calling ioctl(), because need_update variable is not explicitly
> initialized.

Thanks! Applied!

> ---
>  src/udev/net/ethtool-util.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c
> index 68ddd25..c644f91 100644
> --- a/src/udev/net/ethtool-util.c
> +++ b/src/udev/net/ethtool-util.c
> @@ -67,7 +67,7 @@ int ethtool_set_speed(int fd, const char *ifname, unsigned 
> int speed, Duplex dup
>  {
>  struct ifreq ifr;
>  struct ethtool_cmd ecmd;
> -bool need_update;
> +bool need_update = false;
>  int r;
>  
>  if (speed == 0 && duplex == _DUP_INVALID)
> @@ -120,7 +120,7 @@ int ethtool_set_speed(int fd, const char *ifname, 
> unsigned int speed, Duplex dup
>  int ethtool_set_wol(int fd, const char *ifname, WakeOnLan wol) {
>  struct ifreq ifr;
>  struct ethtool_wolinfo ecmd;
> -bool need_update;
> +bool need_update = false;
>  int r;
>  
>  if (wol == _WOL_INVALID)


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] loginctl: convert to sd-bus

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 08:58, Simon Peeters (peeters.si...@gmail.com) wrote:

Thanks! Applied!

I made some changes though. I didn't like log_bus_error() since it took
away format strings. So I reworked that. However I did like
log_parse_error() and generalized it and added it to bus-error.h since
this is probably something like log_oom() which will be the same error
generated a thousand times everywhere.

> NOTE: the show-* subcommands do not print some properties:
>   this are those with types like (so), a(so), (uo),...
>   we need to fix this, but I'm not sure how

We probably should extend bus_print_all_properties to take an extra
function pointer which is called for all properties it cannot print on
its own.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/7] bus: rename sd_bus_get_property_{trivial, basic}

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 19:15, Lennart Poettering (lenn...@poettering.net) wrote:

> On Thu, 07.11.13 13:49, Marc-Antoine Perennou (marc-anto...@perennou.com) 
> wrote:
> 
> This one is unfortunately not that easy. The reason this checks for
> trivial and not basic types is that strings (which are basic, but not
> trivial) are pointers in C. Usually we just return pointers into the
> actual message. However, in this case the message is freed before
> returning from sd_bus_get_property_trivial(), hence we cannot do
> this. The alternative would be to allocate the thing from the heap and
> return that, but that means the caller must know that and free it
> afterwards. But those would be quite surprising semantics, especially
> given that sd_bus_read_basic() does not require this, and the non-string
> basic types require neither.
> 
> I can see though that it would be a good thing to read strings with an
> easy call. I am hence going to add a separate call for this now, which
> hopefully makes this a bit more understandable.

I now added sd_bus_get_property_string() and sd_bus_get_property_strv()
to make it easy to read strings and strv properties. For both of them
the result must be freed.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 4/7] bus: rename sd_bus_get_property_{trivial, basic}

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 13:49, Marc-Antoine Perennou (marc-anto...@perennou.com) wrote:

This one is unfortunately not that easy. The reason this checks for
trivial and not basic types is that strings (which are basic, but not
trivial) are pointers in C. Usually we just return pointers into the
actual message. However, in this case the message is freed before
returning from sd_bus_get_property_trivial(), hence we cannot do
this. The alternative would be to allocate the thing from the heap and
return that, but that means the caller must know that and free it
afterwards. But those would be quite surprising semantics, especially
given that sd_bus_read_basic() does not require this, and the non-string
basic types require neither.

I can see though that it would be a good thing to read strings with an
easy call. I am hence going to add a separate call for this now, which
hopefully makes this a bit more understandable.

> ---
>  src/analyze/analyze.c | 2 +-
>  src/libsystemd-bus/bus-convenience.c  | 4 ++--
>  src/libsystemd-bus/libsystemd-bus.sym | 2 +-
>  src/systemd/sd-bus.h  | 2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
> index 22bf076..522e618 100644
> --- a/src/analyze/analyze.c
> +++ b/src/analyze/analyze.c
> @@ -123,7 +123,7 @@ static int bus_get_uint64_property(sd_bus *bus, const 
> char *path, const char *in
>  _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
>  int r;
>  
> -r = sd_bus_get_property_trivial(
> +r = sd_bus_get_property_basic(
>  bus,
>  "org.freedesktop.systemd1",
>  path,
> diff --git a/src/libsystemd-bus/bus-convenience.c 
> b/src/libsystemd-bus/bus-convenience.c
> index 0ccc259..db15fdd 100644
> --- a/src/libsystemd-bus/bus-convenience.c
> +++ b/src/libsystemd-bus/bus-convenience.c
> @@ -270,7 +270,7 @@ _public_ int sd_bus_get_property(
>  return 0;
>  }
>  
> -_public_ int sd_bus_get_property_trivial(
> +_public_ int sd_bus_get_property_basic(
>  sd_bus *bus,
>  const char *destination,
>  const char *path,
> @@ -285,7 +285,7 @@ _public_ int sd_bus_get_property_trivial(
>  assert_return(bus, -EINVAL);
>  assert_return(isempty(interface) || 
> interface_name_is_valid(interface), -EINVAL);
>  assert_return(member_name_is_valid(member), -EINVAL);
> -assert_return(bus_type_is_trivial(type), -EINVAL);
> +assert_return(bus_type_is_basic(type), -EINVAL);
>  assert_return(ptr, -EINVAL);
>  assert_return(BUS_IS_OPEN(bus->state), -ENOTCONN);
>  assert_return(!bus_pid_changed(bus), -ECHILD);
> diff --git a/src/libsystemd-bus/libsystemd-bus.sym 
> b/src/libsystemd-bus/libsystemd-bus.sym
> index 5eecfa1..01a0c8a 100644
> --- a/src/libsystemd-bus/libsystemd-bus.sym
> +++ b/src/libsystemd-bus/libsystemd-bus.sym
> @@ -141,7 +141,7 @@ global:
>  /* Convenience calls */
>  sd_bus_call_method;
>  sd_bus_get_property;
> -sd_bus_get_property_trivial;
> +sd_bus_get_property_basic;
>  sd_bus_set_property;
>  sd_bus_reply_method_return;
>  sd_bus_reply_method_error;
> diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
> index 48edc59..e38f4a4 100644
> --- a/src/systemd/sd-bus.h
> +++ b/src/systemd/sd-bus.h
> @@ -212,7 +212,7 @@ int sd_bus_message_rewind(sd_bus_message *m, int 
> complete);
>  
>  int sd_bus_call_method(sd_bus *bus, const char *destination, const char 
> *path, const char *interface, const char *member, sd_bus_error *error, 
> sd_bus_message **reply, const char *types, ...);
>  int sd_bus_get_property(sd_bus *bus, const char *destination, const char 
> *path, const char *interface, const char *member, sd_bus_error *error, 
> sd_bus_message **reply, const char *type);
> -int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const 
> char *path, const char *interface, const char *member, sd_bus_error *error, 
> char type, void *ptr);
> +int sd_bus_get_property_basic(sd_bus *bus, const char *destination, const 
> char *path, const char *interface, const char *member, sd_bus_error *error, 
> char type, void *ptr);
>  int sd_bus_set_property(sd_bus *bus, const char *destination, const char 
> *path, const char *interface, const char *member, sd_bus_error *error, const 
> char *type, ...);
>  int sd_bus_reply_method_return(sd_bus *bus, sd_bus_message *call, const char 
> *types, ...);
>  int sd_bus_reply_method_error(sd_bus *bus, sd_bus_message *call, const 
> sd_bus_error *e);


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 5/7] bus: mark sd_bus_message_at_end public

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 13:49, Marc-Antoine Perennou (marc-anto...@perennou.com) wrote:

Applied! Thanks!

> ---
>  src/libsystemd-bus/bus-message.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libsystemd-bus/bus-message.c 
> b/src/libsystemd-bus/bus-message.c
> index 16b2201..cc62050 100644
> --- a/src/libsystemd-bus/bus-message.c
> +++ b/src/libsystemd-bus/bus-message.c
> @@ -2415,7 +2415,7 @@ static bool message_end_of_array(sd_bus_message *m, 
> size_t index) {
>  return index >= c->begin + BUS_MESSAGE_BSWAP32(m, *c->array_size);
>  }
>  
> -int sd_bus_message_at_end(sd_bus_message *m, int complete) {
> +_public_ int sd_bus_message_at_end(sd_bus_message *m, int complete) {
>  assert_return(m, -EINVAL);
>  assert_return(m->sealed, -EPERM);
>  


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 3/7] bus: fix bus_print_property with strv

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 13:49, Marc-Antoine Perennou (marc-anto...@perennou.com) wrote:

Applied! Thanks!

> ---
>  src/libsystemd-bus/bus-util.c | 29 -
>  1 file changed, 12 insertions(+), 17 deletions(-)
> 
> diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
> index 13ad444..2a9cd4f 100644
> --- a/src/libsystemd-bus/bus-util.c
> +++ b/src/libsystemd-bus/bus-util.c
> @@ -545,33 +545,28 @@ int bus_print_property(const char *name, sd_bus_message 
> *property, bool all) {
>  
>  case SD_BUS_TYPE_ARRAY:
>  if (streq(contents, "s")) {
> -bool space = false;
> -char tp;
> -const char *cnt;
> +bool first = true;
> +const char *str;
>  
>  r = sd_bus_message_enter_container(property, 
> SD_BUS_TYPE_ARRAY, contents);
>  if (r < 0)
>  return r;
>  
> -r = sd_bus_message_peek_type(property, &tp, &cnt);
> +while((r = sd_bus_message_read_basic(property, 
> SD_BUS_TYPE_STRING, &str)) > 0) {
> +if (first)
> +printf("%s=", name);
> +
> +printf("%s%s", first ? "" : " ", str);
> +
> +first = false;
> +}
>  if (r < 0)
>  return r;
>  
> -if (all || cnt) {
> -const char *str;
> -
> +if (first && all)
>  printf("%s=", name);
> -
> -while((r = 
> sd_bus_message_read_basic(property, SD_BUS_TYPE_STRING, &str)) >= 0) {
> -printf("%s%s", space ? " " : "", 
> str);
> -
> -space = true;
> -}
> -if (r < 0)
> -return r;
> -
> +if (!first || all)
>  puts("");
> -}
>  
>  r = sd_bus_message_exit_container(property);
>  if (r < 0)


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/7] bus: fix bus_message_read_strv

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 18:50, Lennart Poettering (lenn...@poettering.net) wrote:

> On Thu, 07.11.13 13:48, Marc-Antoine Perennou (marc-anto...@perennou.com) 
> wrote:
> 
> > message_read_strv_extend returns 0 on success
> 
> Ah, hmm.
> 
> sd_bus_message_read_strv() was actually right,
> bus_message_read_strv_extend() isn't!
> 
> The rule is: we return 0 when we hit the end of an array and 1 on
> success. 

Oh, and I forgot to say: I fixed bus_message_read_strv_extend() now
accordingly.

Thanks!

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/7] bus: fix bus_message_read_strv

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 13:48, Marc-Antoine Perennou (marc-anto...@perennou.com) wrote:

> message_read_strv_extend returns 0 on success

Ah, hmm.

sd_bus_message_read_strv() was actually right,
bus_message_read_strv_extend() isn't!

The rule is: we return 0 when we hit the end of an array and 1 on
success. 

(If you read beyond the end of a message, a struct, a variant, and so on
we will generate an error, we only return 0 for end of *array*. This is
because arrays have variable sizes, so it makes sense to loop through
them until you reach the end. This is different for messages/structs and
so on where you really need to know what you read.)

> ---
>  src/libsystemd-bus/bus-message.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libsystemd-bus/bus-message.c 
> b/src/libsystemd-bus/bus-message.c
> index 0fd9aa1..16b2201 100644
> --- a/src/libsystemd-bus/bus-message.c
> +++ b/src/libsystemd-bus/bus-message.c
> @@ -4438,7 +4438,7 @@ _public_ int sd_bus_message_read_strv(sd_bus_message 
> *m, char ***l) {
>  assert_return(l, -EINVAL);
>  
>  r = bus_message_read_strv_extend(m, &strv);
> -if (r <= 0) {
> +if (r < 0) {
>  strv_free(strv);
>  return r;
>  }


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/7] bus: allow reading empty arrays

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 13:48, Marc-Antoine Perennou (marc-anto...@perennou.com) wrote:

Applied a similar patch that just makes use of *array_size to detect if
we are looking at an empty array. Also added a test case for this!

Thanks!

> ---
>  src/libsystemd-bus/bus-message.c | 21 +
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/src/libsystemd-bus/bus-message.c 
> b/src/libsystemd-bus/bus-message.c
> index 9543ae3..0fd9aa1 100644
> --- a/src/libsystemd-bus/bus-message.c
> +++ b/src/libsystemd-bus/bus-message.c
> @@ -3567,15 +3567,20 @@ _public_ int sd_bus_message_read_array(sd_bus_message 
> *m,
>  if (r <= 0)
>  return r;
>  
> -c = message_get_container(m);
> -sz = BUS_MESSAGE_BSWAP32(m, *c->array_size);
> +if (message_end_of_array(m, m->rindex)) {
> +p = NULL;
> +sz = 0;
> +} else {
> +c = message_get_container(m);
> +sz = BUS_MESSAGE_BSWAP32(m, *c->array_size);
>  
> -r = message_peek_body(m, &m->rindex, align, sz, &p);
> -if (r < 0)
> -goto fail;
> -if (r == 0) {
> -r = -EBADMSG;
> -goto fail;
> +r = message_peek_body(m, &m->rindex, align, sz, &p);
> +if (r < 0)
> +goto fail;
> +if (r == 0) {
> +r = -EBADMSG;
> +goto fail;
> +}
>  }
>  
>  r = sd_bus_message_exit_container(m);


Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] zsh-completion: Move machine listing to autoload

2013-11-07 Thread Ronny Chevalier
You can do the same with _outputmodes which is used in _systemctl and
_journalctl

2013/11/7 William Giokas <1007...@gmail.com>:
> Instead of having two different listings of machines, use an autoloaded
> function that can be used by other shell completions in the future. It
> will also allow editing a single file to change the way machinectl and
> systemd-run completion for machines.
> ---
>
> An extension of the previous zsh completion patch from Ronny Chevalier.
>
>  shell-completion/zsh/_machinectl  |  7 +--
>  shell-completion/zsh/_sd_machines | 13 +
>  shell-completion/zsh/_systemd-run | 17 +
>  3 files changed, 15 insertions(+), 22 deletions(-)
>  create mode 100644 shell-completion/zsh/_sd_machines
>
> diff --git a/shell-completion/zsh/_machinectl 
> b/shell-completion/zsh/_machinectl
> index 2e5e05c..026d74f 100644
> --- a/shell-completion/zsh/_machinectl
> +++ b/shell-completion/zsh/_machinectl
> @@ -19,12 +19,7 @@
>case $cmd in
>  list) msg="no options" ;;
>  *)
> -  _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
> -  if [[ -n "$_machines" ]]; then
> -_describe 'machines' _machines
> -  else
> -_message 'no machines'
> -  fi
> +  _sd_machines
>esac
>  else
>_message "no more options"
> diff --git a/shell-completion/zsh/_sd_machines 
> b/shell-completion/zsh/_sd_machines
> new file mode 100644
> index 000..1d64d13
> --- /dev/null
> +++ b/shell-completion/zsh/_sd_machines
> @@ -0,0 +1,13 @@
> +#autoload
> +__get_machines () {
> +machinectl --full --no-pager list | {while read -r a b; do echo $a; 
> done;};
> +}
> +
> +local -a _machines
> +_machines=("${(fo)$(__get_machines)}")
> +typeset -U _machines
> +if [[ -n "$_machines" ]]; then
> +_describe 'machines' _machines
> +else
> +_message 'no machines'
> +fi
> diff --git a/shell-completion/zsh/_systemd-run 
> b/shell-completion/zsh/_systemd-run
> index 4bfbd19..9bb7700 100644
> --- a/shell-completion/zsh/_systemd-run
> +++ b/shell-completion/zsh/_systemd-run
> @@ -18,27 +18,12 @@ __slices () {
>  _describe 'slices' _slices
>  }
>
> -__get_machines () {
> -machinectl --full --no-pager list | {while read -r a b; do echo $a; 
> done;};
> -}
> -
> -__machines () {
> -local -a _machines
> -_machines=("${(fo)$(__get_machines)}")
> -typeset -U _machines
> -if [[ -n "$_machines" ]]; then
> -_describe 'machines' _machines
> -else
> -_message 'no machines'
> -fi
> -}
> -
>  _arguments \
>  {-h,--help}'[Show help message]' \
>  '--version[Show package version]' \
>  '--user[Run as user unit]' \
>  {-H+,--host=}'[Operate on remote 
> host]:[user@]host:_sd_hosts_or_user_at_host' \
> -{-M+,--machine=}'[Operate on local container]:machines:__machines' \
> +{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' 
> \
>  '--scope[Run this as scope rather than service]' \
>  '--unit=[Run under the specified unit name]:unit name' \
>  '--description=[Description for unit]:description' \
> --
> 1.8.5.rc0
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] zsh-completion: Move machine listing to autoload

2013-11-07 Thread William Giokas
Instead of having two different listings of machines, use an autoloaded
function that can be used by other shell completions in the future. It
will also allow editing a single file to change the way machinectl and
systemd-run completion for machines.
---

An extension of the previous zsh completion patch from Ronny Chevalier.

 shell-completion/zsh/_machinectl  |  7 +--
 shell-completion/zsh/_sd_machines | 13 +
 shell-completion/zsh/_systemd-run | 17 +
 3 files changed, 15 insertions(+), 22 deletions(-)
 create mode 100644 shell-completion/zsh/_sd_machines

diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl
index 2e5e05c..026d74f 100644
--- a/shell-completion/zsh/_machinectl
+++ b/shell-completion/zsh/_machinectl
@@ -19,12 +19,7 @@
   case $cmd in
 list) msg="no options" ;;
 *)
-  _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
-  if [[ -n "$_machines" ]]; then
-_describe 'machines' _machines
-  else
-_message 'no machines'
-  fi
+  _sd_machines
   esac
 else
   _message "no more options"
diff --git a/shell-completion/zsh/_sd_machines 
b/shell-completion/zsh/_sd_machines
new file mode 100644
index 000..1d64d13
--- /dev/null
+++ b/shell-completion/zsh/_sd_machines
@@ -0,0 +1,13 @@
+#autoload
+__get_machines () {
+machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
+}
+
+local -a _machines
+_machines=("${(fo)$(__get_machines)}")
+typeset -U _machines
+if [[ -n "$_machines" ]]; then
+_describe 'machines' _machines
+else
+_message 'no machines'
+fi
diff --git a/shell-completion/zsh/_systemd-run 
b/shell-completion/zsh/_systemd-run
index 4bfbd19..9bb7700 100644
--- a/shell-completion/zsh/_systemd-run
+++ b/shell-completion/zsh/_systemd-run
@@ -18,27 +18,12 @@ __slices () {
 _describe 'slices' _slices
 }
 
-__get_machines () {
-machinectl --full --no-pager list | {while read -r a b; do echo $a; 
done;};
-}
-
-__machines () {
-local -a _machines
-_machines=("${(fo)$(__get_machines)}")
-typeset -U _machines
-if [[ -n "$_machines" ]]; then
-_describe 'machines' _machines
-else
-_message 'no machines'
-fi
-}
-
 _arguments \
 {-h,--help}'[Show help message]' \
 '--version[Show package version]' \
 '--user[Run as user unit]' \
 {-H+,--host=}'[Operate on remote 
host]:[user@]host:_sd_hosts_or_user_at_host' \
-{-M+,--machine=}'[Operate on local container]:machines:__machines' \
+{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
 '--scope[Run this as scope rather than service]' \
 '--unit=[Run under the specified unit name]:unit name' \
 '--description=[Description for unit]:description' \
-- 
1.8.5.rc0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC][PATCH] networkd: add a basic network daemon

2013-11-07 Thread Holger Winkelmann [TP]

> A native and fast DHCP client will be part of it, yes, it is needed in
> the initrd.
> Not sure though when we will get there though.

nice to hear. and right, having it in initrd is nice too.

> 
> > currently we integrate http://0pointer.de/lennart/projects/ifplugd/
> 
> Urks, the 90s calling. :)

Yes, embedded was so old style before... 

> Kay
> 

-- 
Holger Winkelmann
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC][PATCH] networkd: add a basic network daemon

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 16:03, Holger Winkelmann [TP] (h...@travelping.com) wrote:

> 
> Hi,
> 
> > To clarify this: systemd-networkd is supposed to cover the initrd,
> > container, server and (some) embedded usecases. However, use NM or
> > connman for the "interactive" stuff (like wlans and suchlike) you need
> > on laptops/desktops and mobile.
> 
> Will this cover the UseCase of having a DHCP enabled Interface which starts
> asking for IP if the interface is coming up? or is this already considered
> as interactive uses case? in embedded this is often a standard configuration
> as such devices don't have a interactive interface and assigning a IP via
> DHCP makes the live much easier.

Yes, it will watch for link beat and do DHCP. However, it won't provide
APIs to scan and pick WLANs, which kinda require user-interaction to be
useful.

> currently we integrate http://0pointer.de/lennart/projects/ifplugd/

Yikes! That's sooo old. The guy who wrote that must have a beard by now.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC][PATCH] networkd: add a basic network daemon

2013-11-07 Thread Kay Sievers
On Thu, Nov 7, 2013 at 4:03 PM, Holger Winkelmann [TP]
 wrote:
>> To clarify this: systemd-networkd is supposed to cover the initrd,
>> container, server and (some) embedded usecases. However, use NM or
>> connman for the "interactive" stuff (like wlans and suchlike) you need
>> on laptops/desktops and mobile.
>
> Will this cover the UseCase of having a DHCP enabled Interface which starts
> asking for IP if the interface is coming up? or is this already considered
> as interactive uses case? in embedded this is often a standard configuration
> as such devices don't have a interactive interface and assigning a IP via
> DHCP makes the live much easier.

A native and fast DHCP client will be part of it, yes, it is needed in
the initrd.
Not sure though when we will get there though..

> currently we integrate http://0pointer.de/lennart/projects/ifplugd/

Urks, the 90s calling. :)

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC][PATCH] networkd: add a basic network daemon

2013-11-07 Thread Holger Winkelmann [TP]
Hi,

> To clarify this: systemd-networkd is supposed to cover the initrd,
> container, server and (some) embedded usecases. However, use NM or
> connman for the "interactive" stuff (like wlans and suchlike) you need
> on laptops/desktops and mobile.

Will this cover the UseCase of having a DHCP enabled Interface which starts
asking for IP if the interface is coming up? or is this already considered
as interactive uses case? in embedded this is often a standard configuration
as such devices don't have a interactive interface and assigning a IP via
DHCP makes the live much easier.

currently we integrate http://0pointer.de/lennart/projects/ifplugd/
 
> The idea is that this can work jointly with NM/connman in some ways or
> another. For example you can make use of .link files even with
> interfaces that otherwise are handled by connman/NM, but for IP config
> you have to chose one.


 
> Lennart
> 
> --
> Lennart Poettering, Red Hat
> 

-- 
Holger Winkelmann
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [RFC][PATCH] networkd: add a basic network daemon

2013-11-07 Thread Lennart Poettering
On Thu, 07.11.13 01:45, Tom Gundersen (t...@jklm.no) wrote:

> 
> On Wed, Nov 6, 2013 at 7:56 AM, Holger Winkelmann [TP]
>  wrote:
> > We really like to see this direct, how ever would it not better to join
> > efforts for network management. I.e. arch Linux claims with netctl [1]
> > to do network management "the systems way. and there are a few other
> > attempts to do network managent. I.e. netconfd [2] of openWRT is doing
> > network management (kind of monolitic) as a daemon as well which can
> > be configured via Bus RPC. (OK ubus in this case). Not to mention
> > the desktop centric network manager.
> 
> We have looked at and discussed various alternatives, in particular
> with the connman guys. However, none of the existing solutions seem
> amendable to what we want for the server/initrd, some are too
> simplistic and e.g. does not really allow for handling the global
> state that we will need, or compartmentalizes too much the different
> protocols/state machines, whilst others simply have a different focus
> (see Marcel's email in this thread as to why connman's focus is
> different from networkd's and why it makes sense to keep them
> separate).

To clarify this: systemd-networkd is supposed to cover the initrd,
container, server and (some) embedded usecases. However, use NM or
connman for the "interactive" stuff (like wlans and suchlike) you need
on laptops/desktops and mobile.

The idea is that this can work jointly with NM/connman in some ways or
another. For example you can make use of .link files even with
interfaces that otherwise are handled by connman/NM, but for IP config
you have to chose one.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/2] bus: make bus_print_all_properties work for non machinectl cases

2013-11-07 Thread Kay Sievers
On Thu, Nov 7, 2013 at 8:58 AM, Simon Peeters  wrote:
> add a destination parameter and skip properties we can't read
> ---
>  src/libsystemd-bus/bus-util.c | 16 +++-
>  src/libsystemd-bus/bus-util.h |  2 +-
>  src/machine/machinectl.c  |  2 +-
>  3 files changed, 13 insertions(+), 7 deletions(-)

Applied.

Thanks,
Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Regression: systemd-logind failure after migration to internal dbus impl

2013-11-07 Thread Kay Sievers
On Thu, Nov 7, 2013 at 9:34 AM, Oleksii Shevchuk  wrote:
> FYI, systemd-logind is still broken as for
> 86198b2788e56fd05959c2dce670d1646bf99bcd.
> Current symptoms: After leaving S3 logind doesn't sent notifications
> about leaving sleep mode. Instead, it goes to failure state:
>
> systemd[1]: systemd-logind.service: main process exited, code=exited, 
> status=1/FAILURE
> systemd[1]: Unit systemd-logind.service entered failed state.
> systemd[1]: systemd-logind.service holdoff time over, scheduling restart.
> systemd[1]: Stopping Login Service...
> systemd[1]: Starting Login Service...

As talked about on IRC, I tried over night, works all fine here.

Are you running i686, and not x86_64?

Kay
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Regression: systemd-logind failure after migration to internal dbus impl

2013-11-07 Thread Oleksii Shevchuk
FYI, systemd-logind is still broken as for
86198b2788e56fd05959c2dce670d1646bf99bcd.
Current symptoms: After leaving S3 logind doesn't sent notifications
about leaving sleep mode. Instead, it goes to failure state:

systemd[1]: systemd-logind.service: main process exited, code=exited, 
status=1/FAILURE
systemd[1]: Unit systemd-logind.service entered failed state.
systemd[1]: systemd-logind.service holdoff time over, scheduling restart.
systemd[1]: Stopping Login Service...
systemd[1]: Starting Login Service...
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel