Print this page
8485 Remove set but unused variables in usr/src/cmd

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/hal/addons/storage/addon-storage.c
          +++ new/usr/src/cmd/hal/addons/storage/addon-storage.c
   1    1  /***************************************************************************
   2    2   *
   3    3   * addon-storage.c : watch removable media state changes
   4    4   *
        5 + * Copyright 2017 Gary Mills
   5    6   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
   6    7   * Use is subject to license terms.
   7    8   *
   8    9   * Licensed under the Academic Free License version 2.1
   9   10   *
  10   11   **************************************************************************/
  11   12  
  12   13  #ifdef HAVE_CONFIG_H
  13   14  #  include <config.h>
  14   15  #endif
↓ open down ↓ 296 lines elided ↑ open up ↑
 311  312  }
 312  313  
 313  314  int 
 314  315  main (int argc, char *argv[])
 315  316  {
 316  317          char *device_file, *raw_device_file;
 317  318          DBusError error;
 318  319          char *bus;
 319  320          char *drive_type;
 320  321          int state, last_state;
 321      -        char *support_media_changed_str;
 322      -        int support_media_changed;
 323  322          int fd = -1;
 324  323  
 325  324          if ((udi = getenv ("UDI")) == NULL)
 326  325                  goto out;
 327  326          if ((device_file = getenv ("HAL_PROP_BLOCK_DEVICE")) == NULL)
 328  327                  goto out;
 329  328          if ((raw_device_file = getenv ("HAL_PROP_BLOCK_SOLARIS_RAW_DEVICE")) == NULL)
 330  329                  goto out;
 331  330          if ((bus = getenv ("HAL_PROP_STORAGE_BUS")) == NULL)
 332  331                  goto out;
↓ open down ↓ 1 lines elided ↑ open up ↑
 334  333                  goto out;
 335  334          if ((devfs_path = getenv ("HAL_PROP_SOLARIS_DEVFS_PATH")) == NULL)
 336  335                  goto out;
 337  336  
 338  337          drop_privileges ();
 339  338  
 340  339          setup_logger ();
 341  340  
 342  341          sysevent_init ();
 343  342  
 344      -        support_media_changed_str = getenv ("HAL_PROP_STORAGE_CDROM_SUPPORT_MEDIA_CHANGED");
 345      -        if (support_media_changed_str != NULL && strcmp (support_media_changed_str, "true") == 0)
 346      -                support_media_changed = TRUE;
 347      -        else
 348      -                support_media_changed = FALSE;
 349      -
 350  343          dbus_error_init (&error);
 351  344  
 352  345          if ((ctx = libhal_ctx_init_direct (&error)) == NULL) {
 353  346                  goto out;
 354  347          }
 355  348          my_dbus_error_free (&error);
 356  349  
 357  350          if (!libhal_device_addon_is_ready (ctx, udi, &error)) {
 358  351                  goto out;
 359  352          }
↓ open down ↓ 90 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX