---
name: "dpns_setrstatus"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpns_setrstatus"
---

# dpns\_setrstatus(3)

set replica status

## NAME

dpns\_setrstatus - set replica status

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "dpns\_api.h"**

**int dpns\_setrstatus (const char \****sfn***,** **const char** *status***)**

## DESCRIPTION

**dpns\_setrstatus** sets the replica status. This function should be called for example when a replica becomes available, i.e. fully populated.

- *sfn*

  is the Physical File Name for the replica.

- *status*

  specifies the new status. Valid statuses are:

  - **-**

    replica is available.

  - **P**

    replica is being populated.

  - **D**

    replica is going to be deleted.

## RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **ENOENT**

  The named replica does not exist.

- **EACCES**

  Search permission is denied on a component of the file prefix or the caller effective user ID does not match the owner ID of the file or read permission on the file itself is denied.

- **EFAULT**

  *sfn* is a NULL pointer.

- **ENAMETOOLONG**

  The length of *sfn* exceeds **CA\_MAXSFNLEN**.

- **SENOSHOST**

  Host unknown.

- **SENOSSERV**

  Service unknown.

- **SECOMERR**

  Communication error.

- **ENSNACT**

  Name server is not running or is being shutdown.

## SEE ALSO

**[Castor\_limits(4)](/Castor_limits/4.md)**, **[dpns\_listreplica(3)](/dpns_listreplica/3.md)**
