---
name: "nvme_set_root"
section: "2"
platform: "linux"
package: "libnvme-dev"
version: "1.13-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nvme_set_root"
---

# nvme\_set\_root(2)

Set nvme\_root\_t context

## NAME

nvme\_set\_root - Set nvme\_root\_t context

## SYNOPSIS

**void nvme\_set\_root** **(nvme\_root\_t r** *);*

## ARGUMENTS

- r

  nvme\_root\_t context

## DESCRIPTION

In order to be able to log from code paths where no root object is passed in via the arguments use the the default one which can be set via this call. When creating a new root object with *nvme\_create\_root* the global root object will be set as well. This means the global root object is always pointing to the latest created root object. Note the first *nvme\_free\_tree* call will reset the global root object.

This function is deprecated. Use nvme\_init\_default\_logging or/and nvme\_init\_logging instead.
