OSDN Git Service

am db554581: build: Update osi log functions, use consistently
authorMarie Janssen <jamuraa@google.com>
Tue, 7 Jul 2015 18:56:36 +0000 (18:56 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Tue, 7 Jul 2015 18:56:36 +0000 (18:56 +0000)
* commit 'db554581079863974af8e1289646f5deea6fc044':
  build: Update osi log functions, use consistently

23 files changed:
1  2 
audio_a2dp_hw/audio_a2dp_hw.c
bta/dm/bta_dm_act.c
bta/gatt/bta_gattc_act.c
bta/hh/bta_hh_le.c
btif/src/bluetooth.c
btif/src/btif_core.c
btif/src/btif_dm.c
btif/src/btif_gatt_client.c
btif/src/btif_gatt_server.c
btif/src/btif_gatt_util.c
btif/src/btif_hh.c
btif/src/btif_media_task.c
btif/src/btif_sock_l2cap.c
btif/src/btif_sock_rfc.c
btif/src/btif_storage.c
hci/src/btsnoop.c
hci/src/hci_inject.c
hci/src/hci_layer.c
osi/src/config.c
stack/btm/btm_ble.c
stack/btm/btm_ble_gap.c
stack/btm/btm_sec.c
stack/l2cap/l2c_api.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -164,9 -153,9 +164,9 @@@ static void update_logging() 
      // Save the old log if configured to do so
      if (stack_config->get_btsnoop_should_save_last()) {
        char last_log_path[PATH_MAX];
 -      snprintf(last_log_path, PATH_MAX, "%s.last", log_path);
 +      snprintf(last_log_path, PATH_MAX, "%s.%llu", log_path, btsnoop_timestamp());
        if (!rename(log_path, last_log_path) && errno != ENOENT)
-         LOG_ERROR("%s unable to rename '%s' to '%s': %s", __func__, log_path, last_log_path, strerror(errno));
+         LOG_ERROR(LOG_TAG, "%s unable to rename '%s' to '%s': %s", __func__, log_path, last_log_path, strerror(errno));
      }
  
      logfile_fd = open(log_path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH);
Simple merge
Simple merge
@@@ -284,14 -283,8 +284,14 @@@ bool config_save(const config_t *config
    fflush(fp);
    fclose(fp);
  
 +  // Change the file's permissions to Read/Write by User and Group
 +  if (chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) == -1) {
 +    LOG_ERROR("%s unable to change file permissions '%s': %s", __func__, filename, strerror(errno));
 +    goto error;
 +  }
 +
    if (rename(temp_filename, filename) == -1) {
-     LOG_ERROR("%s unable to commit file '%s': %s", __func__, filename, strerror(errno));
+     LOG_ERROR(LOG_TAG, "%s unable to commit file '%s': %s", __func__, filename, strerror(errno));
      goto error;
    }
  
Simple merge
Simple merge
Simple merge
Simple merge