[Toybox] getprop.c

Rob Landley rob at landley.net
Wed Feb 14 08:06:09 PST 2018


I'm working on release notes and I noticed this is the android toybox repo:

  Author: Tom Cherry <tomcherry at google.com>
  Date:   Thu Jan 4 10:13:59 2018 -0800

      Reland: Stop building getprop

      We've replaced this with our own C++ version to support the new
      property info parsing.

      Bug: 36001741
      Test: Compared getprop results with toybox getprop
      Change-Id: I022e1ee63635547e2705d43c818579a68f01b872

But this is how toys/android/getprop.c starts:

  /* getprop.c - Get an Android system property
   *
   * Copyright 2015 The Android Open Source Project

  USE_GETPROP(NEWTOY(getprop, ">2Z", TOYFLAG_USR|TOYFLAG_SBIN))

  config GETPROP
    bool "getprop"
    default y
    depends on TOYBOX_ON_ANDROID && TOYBOX_SELINUX
    help
      usage: getprop [NAME [DEFAULT]]

      Gets an Android system property, or lists them all.
  */

  #define FOR_getprop
  #include "toys.h"

  #include <sys/system_properties.h>

  #include <selinux/android.h>

I.E. it "depends on" android, it's in the android directory, the help text says
it's for android, and i'm pretty sure non-android systems haven't got
selinux/android.h. There can be no non-android use of this command.

Shouldn't we remove this command from toybox if you've decided to use a
different version than the one you yourselves wrote and submitted to toybox...?

Confused,

Rob



More information about the Toybox mailing list